Timeout long loads with an error message

Started by Biology Forums, June 16, 2018, 11:04:08 AM

Previous topic - Next topic

Biology Forums

I find that during the busy times of the year, my server gets saturated with guests wanting to see the web page they're visiting. However, some of my users SOMETIMES have to wait longer than 15 seconds for the page to load -- this is obviously way too long and drives people to leave. I know this could be remedied with a better server and optimization, but I'm wondering if there's a way to limit load times to say 30 seconds, and if it's beyond that, a custom error message appears explaining what's happening.

Could this be done, and how?

drewactual

are you running apache?  if so which?  there is a httpd setting for this. 

however, i feel you can avoid this altogether by simply running OPCache.  it's pulling off the servers HDD that is an issue.  OPCache holds the functions in RAM and re-uses it's prior function- i've seen my server load drop from deep in the red (95+%) to less than 5% under the same conditions with properly configured OPCache alone.... 

Arantor

Except the OP is still on 1.1.x which doesn't work properly on PHP 5.5 which is when the opcache was introduced.

vbgamer45

You can place a lower php execution time but not recommended.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Biology Forums

Quote from: Arantor on June 18, 2018, 10:52:36 AM
Except the OP is still on 1.1.x which doesn't work properly on PHP 5.5 which is when the opcache was introduced.

Correct, on my main website.

Quote from: vbgamer45 on June 18, 2018, 11:04:40 AM
You can place a lower php execution time but not recommended.

Why isn't it recommended?

I run APC cache, but it's still not good enough for my needs.

I still like the idea of timing out to a customizable page.

vbgamer45

It would just be a php error page that script has terminated. not very friendly.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: