• Anonymous User 16775186

    (@anonymized-16775186)


    When my site has too much traffic then it goes to the “Error establishing a database connection” Page and I have to reboot my server it fixes it. I have an automatic script that reboots my server but I want to prevent my website from going down after too much traffic.

    My website is here

    • This topic was modified 5 years, 6 months ago by Anonymous User 16775186.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Looks like you’re trying to run quite a website from your own hardware on what might be a minimal Comcast connection. There’s a point you need to buy more hardware or curtail some services. Your choice but my experience says it only gets worse.

    That Comcast broadband connection may be backwards from what a server needs. A consumer broadband connection works well for web surfing and such but the predominant traffic on a web server goes the other direction. Might not ever be a problem but that’s one thing to consider. If you have Comcast business class service then your connection will be more balanced in the right direction.

    Throw more memory at that server if you can. PHP 7.x is your friend also. An SSD is always a good idea. If you’re doing this on Windows then maybe a Linux box might be a better choice. Swap space on that SSD might really perk things up.

    USB thumbdrive storage? No way. That’s entirely too slow.

    A good cache plugin paired up with a CDN can reduce the server load cheaply.

    Consider a proxy box out front. Nginx or Apache on a Linux machine again.

    Since the choke point might be the database then maybe a second box… maybe a little nicer second box… for your database might be a good step. You’re a hardware guru. Maybe a cluster running your SQL might be a good choice. I’ll leave that up to you. That second box doesn’t need to talk to the outside world. Its IP address is all you need and that IP is on the internal network.

    One last thing, get rid of all the extraneous services on that web server. Email, DNS, crontasks, etc. if you can offload that to ‘elsewhere’ then do so.

    While looking for mass energy sinks consider all them plugins you might have running. Can you reduce them?

    Have you looked at CloudFlare? They’ll take over your DNS for you and help hide the origin server which might reduce some of the random ‘attacks’ and door rattling that costs CPU cycles for nothing. They’ll really help with DDOS attacks and can boost your speed and traffic by 20% or more.

    Caveat: The free CloudFlare tier can work wonders but it’s very impatient. Make sure you have your server working well and responding fast or you’ll see 500 errors originating through CloudFlare and pointing at your origin server. Your only choice then is to turn off the CF proxy (click the orange cloud to gray in the DNS page) or upgrade the CloudFlare account.

Viewing 1 replies (of 1 total)
  • The topic ‘Too much trafic breaking my site’ is closed to new replies.