Lighting-Gallery.net

General => Suggestions => Topic started by: dor123 on June 12, 2019, 03:01:33 AM



Title: 500 Internal Server Error
Post by: dor123 on June 12, 2019, 03:01:33 AM
I recently receives this error often:
(https://i.postimg.cc/kX5Nv4RY/lighting-gallery-net-500-internal-server-error.png)


Title: Re: 500 Internal Server Error
Post by: lightinglover8902 on June 12, 2019, 12:12:01 PM
I'm also having the same issue as well...


Title: Re: 500 Internal Server Error
Post by: Froggy05 on June 12, 2019, 12:58:39 PM
I got that when my network connection was slow.


Title: Re: 500 Internal Server Error
Post by: rjluna2 on June 12, 2019, 01:53:02 PM
Same here.  Please contact administrator to reboot this site.


Title: Re: 500 Internal Server Error
Post by: High Intensity on June 12, 2019, 11:02:57 PM
I've been getting one of these every few days for the last few weeks.


Title: Re: 500 Internal Server Error
Post by: Froggy05 on June 13, 2019, 09:05:58 AM
I got that first time and last time yesterday. Then I clicked: Return to Lighting-Gallery.net Home Page


Title: Re: 500 Internal Server Error
Post by: Froggy05 on June 13, 2019, 09:16:00 AM
Now I got that again! ???


Title: Re: 500 Internal Server Error
Post by: Patrick on June 13, 2019, 06:19:17 PM
Sorry for the inconvenience, I am not sure what the issue is yet.  It's sporadic nature makes it hard to track down.  I'll see what I can do.


Title: Re: 500 Internal Server Error
Post by: HomeBrewLamps on June 14, 2019, 08:21:40 AM
I got it a few times myself.. when i reload the page the site works again but its still strange.


Title: Re: 500 Internal Server Error
Post by: wide-lite 1000 on June 15, 2019, 07:38:34 PM
Just did it to me a few times while commenting, usually the site responds very slowly to commands before and after this error occurs.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 15, 2019, 07:46:16 PM
I couldn't enter the website at all and got this error all the time. And even after I managed to enter the website, I get this error when trying to enter my gallery.
Also: Now the website is very slow.


Title: Re: 500 Internal Server Error
Post by: Patrick on June 16, 2019, 12:31:11 PM
I have made a change that improves performance of of the main gallery page.  I don't know if this will reduce the number of errors, but at least the gallery home page typically loads in 2-3 seconds, whereas before it averaged around 8-10 seconds.  It had been one of the slower pages.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 17, 2019, 04:03:27 AM
Got the error again for several seconds, when refreshing my gallery and than return to normal.


Title: Re: 500 Internal Server Error
Post by: Patrick on June 17, 2019, 03:18:32 PM
I have made a few additional optimizations.  Hopefully they help a bit.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 18, 2019, 11:44:56 AM
Once again receiving this error now.


Title: Re: 500 Internal Server Error
Post by: Patrick on June 18, 2019, 04:14:01 PM
All the error indicates is that the PHP script had stalled and timed out.  It doesn't provide any detail as to the reason.  It could be resource contention.  I tried to make a few optimizations to reduce load, and it seems to me pages have been opening a little faster, but that may not have been the underlying issue or might not have reduced contention sufficiently.  It's also possible that a defect such as a memory leak exists that eventually bogs down the PHP process until it finally stalls out.  Regardless, it occurs as a result of concurrent activity and isn't reproducible, making it tough to pinpoint.  I'll do some more digging.  If you can identify any pattern to it, feel free to let me know.


Title: Re: 500 Internal Server Error
Post by: Patrick on June 18, 2019, 04:41:52 PM
I have discovered that there are some photos on the site that are taking considerably longer than others to load.  The image files are separate, so it's not the size of the pictures themselves.  Something about certain images or albums is negatively affecting the performance of the database queries used to retrieve data for the page.  Hopefully I'll have a solution soon. 


Title: Re: 500 Internal Server Error
Post by: Patrick on June 18, 2019, 07:17:11 PM
All right, I found there were a number of albums on the site with keywords.  Keywords can be used in searches, but also provide the ability to link albums together to create meta albums containing photos from other albums.  It's a nifty feature, but does not perform well.  I thought we disabled it a long time ago, but some albums still had them set.  So I've wiped out all of the keywords, and if we're lucky, this will reduce the number of timeouts we've been experiencing.


Title: Re: 500 Internal Server Error
Post by: xmaslightguy on June 18, 2019, 08:06:00 PM
Just got one when trying to access  lighting-gallery.net/gallery/thumbnails.php?album=lastcom (http://www.lighting-gallery.net/gallery/thumbnails.php?album=lastcom)
But unlike others here, I really haven't had any issues before this one with getting that error.


Title: Re: 500 Internal Server Error
Post by: High Intensity on June 19, 2019, 08:34:28 PM
Just got another 500 error.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 19, 2019, 08:39:08 PM
Also: The gallery is very slow now.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 20, 2019, 09:29:07 AM
Another form of 500 Internal Server Error:
(https://i.postimg.cc/fWGQFCjq/lighting-gallery-net-500-Internal-Server-Error.png)


Title: Re: 500 Internal Server Error
Post by: Patrick on June 20, 2019, 09:01:07 PM
If necessary, we can upgrade the server's CPU, but the hosting company charges extra for additional cores.  So I don't want to go that route unless it's absolutely necessary.

I blocked a couple of IP addresses for a foreign search engine that were routinely making multiple requests per minute, and I've opened a ticket with the hosting company to find out if they have any recommendations.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 20, 2019, 11:10:04 PM
Continue to get this error.
Try to do the following: https://www.interserver.net/tips/kb/troubleshoot-500-internal-server-error/


Title: Re: 500 Internal Server Error
Post by: rjluna2 on June 21, 2019, 06:03:02 AM
Seems to logged in better and switch from forum to gallery quicker :)


Title: Re: 500 Internal Server Error
Post by: Patrick on June 22, 2019, 08:16:56 PM
After blocking more IP addresses and adding additional robots.txt directives, bot activity seems to be under control for now.  Problems start when the server is receiving requests faster than it can respond.  The result is a traffic jam.  Page loads slow down, and finally requests that can't be fulfilled time out.  Then the queue clears and it speeds up again, but it'll repeat unless the volume of requests is reduced.

Improvements to the hardware and software can also help satisfy the demand, but there's no sense upgrading to support crawlers that aren't benefiting us.  We want Google, Bing, and major search engines to index the site, but the bulk of the traffic was originating from other provides, and appeared to me to be excessive and unnecessary.

The logs look a lot quieter now, and hopefully all of you see an improvement.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 22, 2019, 08:32:24 PM
Right now I didn't experience this problem for at least one or two days.


Title: Re: 500 Internal Server Error
Post by: Fluorescent05 on June 22, 2019, 09:42:41 PM
Just did it to me a few times while commenting, usually the site responds very slowly to commands before and after this error occurs.
Same for me, usually I'll wait a long time after commenting or clicking on a gallery photo, then a 500 internal server error will pop up.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 23, 2019, 03:20:17 AM
The problem returned for a sec without my knowledge:
(https://i.postimg.cc/SxpXkZtt/lighting-gallery-net-500-internal-server-error-2.png)


Title: Re: 500 Internal Server Error
Post by: Patrick on June 23, 2019, 09:00:05 AM
I can't blame that one on bots.  There weren't any active at the time.  Something else must have been responsible for the timeout.  I'll see if I can find anything.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 27, 2019, 02:45:53 AM
Seems that the error has been disappeared, since I don't get it right now for several days.


Title: Re: 500 Internal Server Error
Post by: dor123 on June 30, 2019, 02:39:34 AM
I got this error once again.


Title: Re: 500 Internal Server Error
Post by: Fluorescent05 on June 30, 2019, 06:47:49 AM
I have not gotten it for a long time (about a week and a half).


Title: Re: 500 Internal Server Error
Post by: High Intensity on June 30, 2019, 11:07:28 PM
Got another 500 error just now.


Title: Re: 500 Internal Server Error
Post by: dor123 on July 06, 2019, 03:14:11 AM
The problem occurred again in both the forum and the gallery, after several day that it didn't occurred at all.


Title: Re: 500 Internal Server Error
Post by: fluorescent lover 40 on July 06, 2019, 04:17:20 PM
I haven't got this error in three and a half weeks.