Slot speed in remote upload using external mysql server

enricodias4654

Member
YetiShare User
Jan 13, 2015
411
1
16
Using an external mysql server the remote uploads become very slow. Using an 1gbps port and a external mysql server with 9ms of latency I got 800KB/seg. Using curl in the command line I got 70MB/seg.

This problem is caused by the method remoteUrlCurlProgressCallback in the uploader.class.php. This function is called several times per second making 1 update query every time.

Setting CURLOPT_BUFFERSIZE to reduce the number of times that remoteUrlCurlProgressCallback is called doesn't work for 2 reasons: The first is that curl documentation states that setting CURLOPT_BUFFERSIZE is treated as a request, not an order. The second is that CURLOPT_BUFFERSIZE must not be > than CURL_MAX_WRITE_SIZE. The default value for CURL_MAX_WRITE_SIZE is 16k and it's static.

The solution is disabling the callback or track time inside the callback function, performing the query only 1 every X seconds.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
i guess the script needs further tuning done by admins in the next release. I am glad you posted this because i was thinking of setting up a separate database server but now i will wait until its more tuned...