-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The curl_multi can break down nextcloud or the db connections #65
Comments
@rabser Great, I'm happy to hear you like it :) Sharing the patch would be very appreciated, indeed. |
I'm sorry but I never understood how to use the pull requests (my fault), so I paste here the patch, as it's very simple: In functions.php substitute starting from line 314
with this block
then add a close brace after
to
which in original file is in line 350. Obviously a better work should having a config item for chunking size, for a simpler tuning. HTH |
I had the same thought. A config option will be made available in the next version. Thank you for contributing to this project 👍, no need to apologize for the pull request. Just in case you would like to practice (as it is quite easy in Githubs Web UI):
|
Great! i didn’t know that i could simply edit directly a file to get a pull request (I manage several gitlab self hosted servers, so that i could edit a file was known to me). |
@rabser A new version containing your chunking proposal and a debug log (both are options in config.php) has been published in the debug branch. May I ask you to test this version as your setup is known to react to these changes? Here is a howto:
|
Hi, Just an hints about the debug.log: if you think to bring that feature to production, you should think that you should left to the admin (eg. in config.php) the choice on were debug.log will be saved or web dir should be writable by the webserver and this is normally not a best practice (nor accepted by providers). HTH |
Thanks a lot for testing! Glad to hear it works in "real life". For production I am planning to show an error message after user data has been fetched and at least one transfer has failed, including a hint to alter the This error message could offer a "download log file" button. Log data would be kept in a $_SESSION var until download is actively chosen. What do you think? |
I'm not so used to save data into the $_SESSION, but yes, I can't see any problem in this strategy. |
I experienced bad runs (many users empty lines) and a general DOS on nextcloud server when using this wonderful tool (480 users registered), as curl_multi is too aggressive.
I solved it by splitting the array of users in chunks simply wrapping the “curl_multi” user data attributes using array_chunk on the users list read from $SESSION.
Chunking in blocks of 50 users I managed to get all the info about them without loosing nextcloud or the backend database…
If my patch can be of any interest, i can share.
The text was updated successfully, but these errors were encountered: