Critical error: Could not connect to database-server (when authenticating) (Too many connections)
Posted
#4742
(In Topic #959)
Critical error – bailing out
Hello,Critical error – bailing out
Could not connect to database-server (when authenticating) (Too many connections)It seems like once a month I get this and the system is down for a few hours. I am waiting for it to come back now, fingers crossed.
Honestly I think it the server I am using and not a problem with Composr.
I am running other composr sites on different servers and this has never happened.
The server this is on is hosted by a friend, he is giving me some space on a server that is also hosting other people so my guess is it is maxed out.
My new goal is to migrate my site to a different server.
Anyone else run into this problem?
I am going to "... increase the number of connections to your MySQL server..." and see if that helps
Posted
I can't even login via shell so its a server problem for sure
Posted
Often some kind of system slow-down will backup web requests, causing limited resources (like the MySQL connection pool) to max out.
It could be bot activity, for example.
Posted
If you are administrating a server you could come across situations where the server 'grinds to a halt', or spits out depleted resources messages. This isn't a Composr problem, but just like any desktop computer can take on too much work, so can a server.
In these kinds of situations you need to identify what server resource is depleted. Typically it is either:
- Disk I/O
- Memory
- CPU
- Network I/O (available bandwidth)
There are are various commands on Linux that are useful during diagnosis…
| Command | Purpose | Hints |
|---|---|---|
| uptime | Show the CPU load at different points in time | If the load level is higher than the number of CPU cores in the server, you have a serious issue. |
| ps -Af | Show all active tasks | This will show you if you have a run-away number of processes (e.g. dozens of Apache instances). |
| top -n1 | Show active processes, sorted by CPU usage; also, total CPU usage, memory usage, and I/O wait time | This will tell you what processes are using a lot of CPU or memory (press M to sort by memory), as well as giving you good clues to what resource is primarily depleted. |
| iostat | Show CPU and disk load | This is useful to find disk I/O load. |
| iotop | Show active processes by I/O load | This command usually is not installed by default. It is very useful to find what processes are doing a lot of I/O. |
There is an 'art' to finding the cause of a performance slow-down. Often just one depleted resource will have a knock-on effect on others. For example, if I/O is saturated, memory may become depleted as Apache processes back up.
A skilled system administrator will:
- Stay on top of performance metrics, to know what needs optimising or where to spend more on hardware
- Develop experience isolating the cause of slow-downs, pointing to programmers where they need to do profiling and optimisation
- Configure a server so that excess activity results in appropriate error messages, rather than a crashed server (for example, by configuring the Apache settings to limit the number of processes and threads to what the server can actually handle)
2 guests and 0 members have recently viewed this.
