Server crashes on high traffic

Hi everyone

I have a question i have a dedicated server with an I7 2600K and 32GB ram memory.and an ssd.

But now my question is how can i configure the server to allow thousands of connections at the same time?

If the server gets lots of traffic at the same time it’s like mysql and httpd crashes and slows the server so much that pages only load 10 minutes afterwards

Kind regards.

Do you have your own server or are you paying a host?

Have you checked your error logs to see what’s doing it?

Reason I ask, a friend of mine’s web host limits his MYSQL queries to 75,000 per hour. That sounds like a lot but it isn’t. It will crash his Wordpress site and go to the installer when the host shuts down his MYSQL for hitting the limit.

If it’s your server, you can set the MYSQL to limitless if that’s what’s causing it.

I own my own server it’s in my house, but do you know any tricks to allow thousands of connections?

Error log doesn’t say much in regards of the traffic.

Could you translate this to connections per second or connections per minute? Before you answer, you should do a bit of research on the connnections per second / minute that the top 10 or the top 100 websites in your segment handle. The number could be surprisingly low.

Your system has decent specs. I imagine it could handle a sizable amount of traffic and unless you are running a top 10 or top 100 website, your server should be able to handle the traffic without crashing.

Then you’re in the same boat I am.

It may be your internet service provider throttling your connection. My provider doesn’t do that, so that’s not a problem for me, but a lot of them do.

I would do as calport suggested and look at your statistics to see exactly how much traffic you’re really getting. That’s going to be what answers your question more than anything, along with checking your internet contract to see if they have any sort of data limit.

What “crashed”? If it responds 10 minutes afterwards, it can’t have crashed, right? It’s just slow…which is entirely a different problem from “crashed”. So…let’s try to solve the right problem. Did something crash or is it slow?

If something crashed, what? What errors appear in the relevant log when it crashes? (Every service logs somewhere.)

Not that i know off that my ISP is throttling my connection, my server provider has all ports open.

Joe makes a very good point: If your site was still running but just running very slow, then that’s a different thing from crashing.

The only thing I can think of that would just make your site run slow is your internet connection isn’t stable, your internet connection is being throttled (lowered because you’re using too much data) or your server is being overwhelmed.

I don’t think it’s your server.

It makes me wonder if you’re actually being attacked (DDoS’d or otherwise) since you say your provider has “all ports open”. That just sounds like an open invitation to be bombarded with junk traffic and attacks.

Edit to add: You could always PM @calport and have him look at your setup. He’s a good fellow and you can trust him. He did some work on my server when I screwed things up and did a great job. Message him and get him to take a look at it. He’s about the least expensive and best chance you’ve got to figure this out quickly.

1 Like

Running htop, iotop, and iostat may give you a rough idea of where to start looking for the bottleneck.

Are you running a firewall? Maybe you’re getting creamed by miscreants.

Richard

Yes i am using a firewall, but only the standard firewall of Centos.

Okay, I’ve been using CSF for so long I don’t even know how firewalld is configured out-of-the-box these days.

Do you have fail2ban running?

Richard

I’ve dropped Virtualmin bc our websites were sluggish, getting frequent timeouts and showing other performance issues.
After a while we decided to deploy an alternative structure and test to see if we could pin the issues to Virtualmin or not.

We describe a bit more of it here: Webmin for MariaDB exclusively - SLOW

Solution with Virtualmin server for webpages and Webmin for DB: long page loading times, timeouts, errors.
Solution w/o Virtualmin, with aaPanel for minimal site/domain handling and external DB server, same specs, works like a breeze.

@maverick please stop spamming for aapanel. We’re happy you found something you like and that works for you, but it is not relevant to OPs issue. Database performance is not related to Virtualmin (or aapanel); we don’t even provide the database package! It’s provided by the OS. If there are database performance issues then they need to be addressed at the database. Changing your control panel does not affect database performance.

To solve OPs problems, we need more information about what the actual problem is.

2 Likes

Hi man it’s really fun you say my other post looks like spam say a bunch of crap and lock the topic so I can’t even reply. clap clap.
So to that you say the post looks like spam, it doesn’t. It’s the sharing of a phenomena that started with errors on a website, then there was a try to tweak and improve performance, no visible changes, and then going to other approaches to try and see where the problem is.

You simply dismiss the issues and the whole post as nonsense, like I have any mission here. The only plausible interpretation of a mission is to share with you, product owner, issues that can be observed by doing simple tests. Anyone with an hypervisor and some resources can take an academia afternoon and do some tests.

Also, there were two performance issues. Not only the database performance improved when moved to a server the only had mariadb installed, instead of webmin+mariadb only, and also a huge performance improvement as well when tested with another server hosting the files, that were previously hosted on a virtualmin server. (webmin/virtualmin only w/dns and no email nor other services).

Btw, I don’t give a crap about aaPanel, the only plus it has its that’s really lightweight and it easily sets up a domain. its a basic GUI, I don’t use any other features of it other than to add domains and install apache and php. obviously it could also be done via CLI but its just an simple and easy alternative to set on test servers.

The other topic was auto-locked due to age, I didn’t lock it to prevent you from replying…it was already locked. I replied because it was wrong information, and I didn’t want people to be misled about the relationship between MySQL/MariaDB performance and Virtualmin…there is no relationship.

Anyway, I didn’t want to start an argument, just wanted to be clear and emphatic: Virtualmin (and Webmin) have nothing to do with database performance. Whatever you believe your testing proved, it is not that. It literally cannot possibly be that. I promise. I believe you saw slow performance, but the reason you have attributed for that performance problem is incorrect.

2 Likes

not sure if my comment is relevant or not, but I thought I’d post :o)

I see reference to databases, perhaps the queries and the quantity are making the database slow to respond (which they may do over a period of time when things get busy). are the queries optimised, did you create Indexes (that in my opinion help to speed up the access - but needs more memory)

1 Like

Are you seriously suggesting that the panel you use is affecting scripts that run completely outside of the panel software?

That’s like saying what color the car is changes its performance when it’s the same car.

1 Like

I’m saying that performing AB Testing on servers with the same exact specs there’s a performance decrease when the server has webmin or virtualmin installed.

As previously mentioned the packages used are the distro’s own packages and its own repos not packages by webmin, but IIRC webmin has its own processes running alongside all the rest.

Just looking at running processes I see over 10 processes that are from webmin itself. If you don’t see them, probably you’ll have to go on options and UNTICK the option to “Hide Webmin processes from list” - convenient!

To all matters and as I mentioned early I give as much crap about webmin as I do about any alternative. We use what suits best. Our customers are on cPanel servers, we use alternatives for internal projects and specific customers. The initial post that is now locked was simply a description of an observable event, and the steps taken to try and fix:

  • tweaking options to improve performance;
  • testing with another DB server (with the same specs/resources as the original);
    and finally testing with another server holding the files.

So yea, to @Gomez_Adams, I am seriously suggesting that a piece of software installed on a server may have impact on the overall server performance. Like its something unseen. :man_facepalming:

Can you supply all of the documentation for this finding with the system logs from each system, OS and Panel?

I’d be very interested in seeing it.

There is a simple way to see if Webmin/Virtualmin, the control panel itself, is impacting performance of any other services: systemctl stop webmin

The only way that would make a big difference in database performance is if memory is very low and freeing up ~100MB will make a big difference in swapping behavior.

There are performance trade-offs in the various PHP execution modes (generally PHP-FPM and fcgid are the fastest, though which of the two is faster depends on workload and a variety of factors), but again not super related to which control panel set them up. But, since in @maverick’s case, he said it was determined to be database performance, the PHP performance (and web server performance) is also irrelevant.

1 Like