- Posts: 48
Internal Server Error
- Robert
- Topic Author
- Offline
- Senior Member
-
I have initiated a server change within my hosting provider to have all a bit larger and hopefully faster, definitely will be looking at execution time ...
BTW, do you know how I can add a 500 or other larger figure for import on the Joomdle import page ? right now there is only a choice for 50, 100 or all .. but not e.g. 500 - could that be done manually from my side in the script ?
I guess temporary code hacking ...
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7902
I have migrated large installations, using custom scripts, that do only a few users per call, and reloads itself to continue.
I don't have the code with me here, but I will check to see if I have something you can use.
BTW, are you syncing users from Joomla to Moodle, or the other way?
Please Log in or Create an account to join the conversation.
- Robert
- Topic Author
- Offline
- Senior Member
-
- Posts: 48
First, I need to add about 10'000 Moodle users to Joomla, then add them to Joomdle and sync if necessary.
Please Log in or Create an account to join the conversation.
- Rafael
- Offline
- New Member
-
- Posts: 9
max_execution_time
change to 60
and
max_input_time
change to 60
Please Log in or Create an account to join the conversation.
- Robert
- Topic Author
- Offline
- Senior Member
-
- Posts: 48
It appears you have done something like this before. How many Moodle users have you been able to add to Joomla via Joomdle in one batch with your suggested settings ?
Robert
Please Log in or Create an account to join the conversation.
- Rafael
- Offline
- New Member
-
- Posts: 9
Robert wrote: Thanks Rafael,
It appears you have done something like this before. How many Moodle users have you been able to add to Joomla via Joomdle in one batch with your suggested settings ?
Robert
I'm sorry. My english is not good.
Actually the error "internal server error" displays when a script runs out of resources or it hasn't time to execute.
Knowing that the default php.ini file has "short" set params, I know that the solution is this.
With other Joomla! components happens too.
I could not tell how many Moodle users have been able to add, because I haven't done, but you should be able to greatly increase the current number of migrated users.
Certainly, you should not increase much more the max_execution_time and max_input_time (60).
Regards
Please Log in or Create an account to join the conversation.
- Robert
- Topic Author
- Offline
- Senior Member
-
- Posts: 48
You mentioned something about a script you might have for me... did you find any?
Thanks for all these tips.. great community, just made a contribution via PayPal
Gracias,
Robert
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7902
Thank you very much for your donation, it is really appreciated.
Sorry for the late reply, but this week has been crazy. I have the test scripts in my other laptop, so I will try to get them when I get home later today.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7902
I found the code I told you about, but I think it is not good for you, as you have Joomla and Moodle on different servers right?
What I have is a php function to migrate all moodle users to Joomla, using only database calls, to gain speed (most of the time spent in migration process is communication between joomla and moodle)
Just in case, I include the function. It has some exit calls for testing first:
If you have Jooma and Moodle on different servers, I am thinking of a trick: export moodle database (I think you only need users table) and import it into a temp database in joomla server.
Then modify above script to use that new database to fetch the users.
Warning: before running the script, you should disable joomdlehooks plugin, so no sync calls are made to Moodle. This will make the process much faster, as it will happen only on Joomla.
There is still a problem, though: the above script also modifies Moodle user table, to set auth method of the migrated users to "joomdle". This you cannot do with the trick, unless you later export the table again and import it into the real moodle database.
Another option, if you are going to migrate all users, is to just set the auth method directly in the moodle database after you run above script, with something like:
This is the faster method.
A more conventional method would be to create a script in Joomla that fetches some Moodle users each time, migrates them, and reloads itself to keep on working.
But this method is much slower: I did it once in a Moodle server where we could not have database access, and it took over a weekend running non-stop to migrate all users: around 22.000
Please let me know if you need any more info.
I will put this in my TODO list, to try to come up with a good solution that can be included by default in Joomdle next release.
Please Log in or Create an account to join the conversation.
- Robert
- Topic Author
- Offline
- Senior Member
-
- Posts: 48
actually now all is moved on the same server, I will study it and hopefully manage to execute it .. one initial question, does this script only adds Moodle users to Joomla, or does it also Migrate users to Joomdle or would that be an extra script to do ?
Please Log in or Create an account to join the conversation.