Advertisement:

Author Topic: Timeout long loads with an error message  (Read 2266 times)

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,599
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Timeout long loads with an error message
« on: June 16, 2018, 11:04:08 AM »
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?

Offline drewactual

  • Full Member
  • ***
  • Posts: 598
    • College Football Fan Site CFB51
Re: Timeout long loads with an error message
« Reply #1 on: June 18, 2018, 10:43:16 AM »
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.... 

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Timeout long loads with an error message
« Reply #2 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,226
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Timeout long loads with an error message
« Reply #3 on: June 18, 2018, 11:04:40 AM »
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

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,599
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Timeout long loads with an error message
« Reply #4 on: June 18, 2018, 11:23:21 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.

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.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,226
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Timeout long loads with an error message
« Reply #5 on: June 18, 2018, 11:30:55 AM »
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