MG 1.1 annoying 503 errors using litespeed

dotpro

Active member
Hi,

I am getting 503 errors when uploading more than 5 pictures

The following error occurred:

503
Service Unavailable

The server is temporarily busy, try again later!



Your image upload quota:
Maximum Dimensions:
5,000px x 5,000px
Maximum File Size (MB):
10 MB
Maximum Storage Quota (MB):
Unlimited
Maximum Items Per Upload:
20 Items
Allowed Extensions:
png, jpg, jpeg, jpe, gif
 
Larger numbers of uploads may take longer to process and respond, especially if you're uploading large images. This sounds like a timeout error, where your web server is returning this response if PHP doesn't respond within a certain amount of time. You'll need to look at increasing that timeout. (I assume it's a while until you receive this error; if not, it may be different.)
 
This only seems to be happening with xenforo. I can upload files with wordpress, photopost, no problems.

Also, working with litespeed and configuration looks fine.
 
I tried uploading to different site, 10 pictures, about 3 to 5MB each, uploaded without any errors. Only difference is that, it is older version of xenforo and gallery:

XenForo 1.4.6
XenForo Media Gallery 1.0.4
 
Does more than 5 uploads working with older version and not with new one (at least not in my tests) mean anything? I really need help with this issue.

thanks
 
Are they the same pictures on the same server (with identical PHP configs)?

The point I was making was really that it's your web server displaying the error after a certain amount of time. Uploading a number of images can be a server intensive process due to thumbnailing of each of them. If you upload one at a time, for example, it can behave differently. If you're doing a test on a server with a different configuration, it likely has a higher timeout value.
 
Nothing should have changed in the upload process between these versions.

Actually, do you have any anti-DoS elements setup on your server? (Note that your configuration may be domain specific.) One image is uploaded at a time, so this could potentially create a number of quick responses.

You may need to dig into your web server error logs to see if more specific information is logged.
 
I looked, not much that I can determine. I know the host has some DDOS protection.

The server has CSF installed... it is for all domains.

Furthermore, I don't have this issue when uploading files, large multiple uploads in wordpress, in photopost, in vbulletin, etc.
 
Are there any details in the web server error logs to indicate why it gave this error? You may need a higher logging level. Litespeed should be able to give you guidance as to how to get more details from their end.
 
cpanel or litespeed vhosts?
Its cpanel with litespeed.


Here are some of the errors i saw in the logs when troubleshooting with litespeedtech and posted on their forums:



Code:
-01-06 19:31:50.697 [INFO] [198.52.97.90:51897-1#APVH_user.com] File not found [/home/user/public_html/forums/data/xengallery/106/106884-387daffc39aa01e718d5112a905d8c38.jpg]
2016-01-06 19:31:50.698 [INFO] [198.52.97.90:51897-1#APVH_user.com] File not found [/home/user/public_html/404.shtml]
2016-01-06 19:31:50.867 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 16908, procinfo: 0x36d6660
2016-01-06 19:31:51.338 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 16911, procinfo: 0x3709040
2016-01-06 19:31:51.570 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 16916, procinfo: 0x31e6c00
2016-01-06 19:31:53.124 [INFO] [198.52.97.90:51897-5#APVH_user.com] File not found [/home/user/public_html/forums/data/xengallery/106/106885-d9e90970bb0e1a6b9256ec14b94e2c61.jpg]
2016-01-06 19:31:53.124 [INFO] [198.52.97.90:51897-5#APVH_user.com] File not found [/home/user/public_html/404.shtml]
2016-01-06 19:31:54.826 [INFO] [198.52.97.90:51897-8#APVH_user.com] File not found [/home/user/public_html/forums/data/xengallery/106/106888-f8f5e154e82730bc667622afc1d60761.jpg]
2016-01-06 19:31:54.827 [INFO] [198.52.97.90:51897-8#APVH_user.com] File not found [/home/user/public_html/404.shtml]
2016-01-06 19:31:55.394 [INFO] [198.52.97.90:51909-2#APVH_user.com] File not found [/home/user/public_html/forums/data/xengallery/106/106883-e4c89890311eb79a286e47f05a65ed39.jpg]
2016-01-06 19:31:55.394 [INFO] [198.52.97.90:51909-2#APVH_user.com] File not found [/home/user/public_html/404.shtml]
2016-01-06 19:31:55.706 [INFO] [198.52.97.90:51909-4#APVH_user.com] File not found [/home/user/public_html/forums/data/xengallery/106/106894-75244b850f439e627006f7d19050e38b.jpg]
2016-01-06 19:31:55.706 [INFO] [198.52.97.90:51909-4#APVH_user.com] File not found [/home/user/public_html/404.shtml]
2016-01-06 19:32:12.032 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 17081, procinfo: 0x36d6660
2016-01-06 19:32:23.608 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 17185, procinfo: 0x31e6c00
2016-01-06 19:32:50.946 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 17442, procinfo: 0x31e6c00
2016-01-06 19:32:56.524 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 17471, procinfo: 0x35abd70
2016-01-06 19:33:12.075 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18184, procinfo: 0x36d6660
2016-01-06 19:33:31.394 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18333, procinfo: 0x36d6660
2016-01-06 19:34:05.941 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18573, procinfo: 0x35abd70
2016-01-06 19:34:24.197 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18709, procinfo: 0x36d6660
2016-01-06 19:34:24.491 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18716, procinfo: 0x31eaed0
2016-01-06 19:34:24.937 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18718, procinfo: 0x31e6c00
2016-01-06 19:34:27.028 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18729, procinfo: 0x3709040
2016-01-06 19:34:40.612 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18863, procinfo: 0x3709040
2016-01-06 19:34:47.998 [INFO] [APVH_user_Suphp:] PID: 12795, add child process pid: 18960, procinfo: 0x31eaed0
2016-01-06 19:35:00.820 [INFO] [73.54.213.62:40413-0#APVH_user.com] connection to [/tmp/lshttpd/APVH_user_Suphp.sock.671] on request #2, confirmed, 1, associated process: 18863, running: 1, error: Connection reset by peer!
2016-01-06 19:35:00.820 [NOTICE] [73.54.213.62:40413-0#APVH_user.com] POST request in process stage, fail with 503
2016-01-06 19:35:00.820 [NOTICE] [73.54.213.62:40413-0#APVH_user.com] oops! 503 Service Unavailable
2016-01-06 19:35:00.820 [NOTICE] [73.54.213.62:40413-0#APVH_user.com] Content len: 10700, Request line: 'POST /forums/gallery/save-media HTTP/1.1'
2016-01-06 19:35:00.820 [INFO] [73.54.213.62:40413-0#APVH_user.com] Cookie len: 366, ulp-onload-UX9b5WOK65tSt2Ha=ilovelencha; ulp-onexit-UX9b5WOK65tSt2Ha=ilovelencha; xf_edit_language_id=1; xf_edit_style_id=2; xf_FilterList_adminphptemplates=0%2Cxengallery_rss; xf_user=1%2C550325df61e11211a93809e3178571b853279cf4; xf_session=9f5a894c099a02d8b5bc182ed5af8a4e; xf_session_admin=d95bf11c82fc4fe7fadbc2c0f8cb188d; _gat=1; _ga=GA1.2.1350837219.1451622122

Code:
2016-01-07 22:57:28.813 [INFO] [73.54.213.62:52444-0#APVH_user.com] connection to [/tmp/lshttpd/APVH_user_Suphp.sock.466] on request #96, confirmed, 1, associated process: 27270, running: 1, error: Connection reset by peer!
2016-01-07 22:57:28.813 [NOTICE] [73.54.213.62:52444-0#APVH_user.com] POST request in process stage, fail with 503
2016-01-07 22:57:28.813 [NOTICE] [73.54.213.62:52444-0#APVH_user.com] oops! 503 Service Unavailable
2016-01-07 22:57:28.813 [NOTICE] [73.54.213.62:52444-0#APVH_user.com] Content len: 7458, Request line: 'POST /forums/gallery/save-media HTTP/1.1'
 
I assume the highlighted line corresponds with the failure? If so, that would seem to imply that PHP is crashing. What version of PHP are you running? (Are you running APC?)
 
Ultimately, this seems like a PHP crash and this isn't something we're directly triggering. It's possible code changes are triggering a different path in PHP which is leading to it crashing. A newer version of PHP (such as 5.6) may help, especially given that 5.4 isn't supported any longer.

There are a lot of things to try in the LS docs to help get a better idea of the cause: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:503-errors
 
Just coming back to this issue again as my staff and uploaders keep complaining about having to upload 5 items per upload when they have hundreds of picture to do.

So further troubleshooting, I was able to fix the issue and upload 15, 20 pictures at a time without an error by disabling the watermark. Is this bug or unknown issue related to GD vs ImageMagick?
 
Mike obviously made some suggestions the last time. How did you get on with these? Really identifying logs which may reveal more about the cause of the error or trying things like different PHP versions will be useful.
 
Chris,
Mike obviously made some suggestions the last time. How did you get on with these? Really identifying logs which may reveal more about the cause of the error or trying things like different PHP versions will be useful.

Thanks. I did upgrade to php 5.6.18, however, the problem is still there. I have other site with xenforo forum and gallery on same server, it does not have any errors when uploading pictures. Only difference is watermark is not enabled on that site and it is on the site where error occurs.

Error did change a little:
The server responded with an error. The error message is in the JavaScript console.
ErrorException:Fatal Error: Maximum execution time of 60 seconds exceeded -library/XenGallery/Helper/Image.php:505
 
Are you able to provide some example images which fail, and the watermark that you are using (and the settings in the Watermark Options tab)?
 
Back
Top Bottom