I have just shifted my website to Linode and I am currently on its 1 GB RAM Plan. By default, number of mysql users was set to 100. This lead to `Too many connections` error.

I edited the mysql settings again with the help of this . However, now the database is crashing almost every day !

Here are my current mysql settings are :-

```
key_buffer              = 100M
max_allowed_packet      = 1M
thread_stack            = 128K
thread_cache_size       = 8
myisam-recover         = BACKUP
max_connections        = 150
table_cache       ​ ​     = 1024​
query_cache_limit       = 300M
query_cache_size        = 300M ​
max_allowed_packet      = 16M
key_buffer              = 100M

```

Can anyone suggest me some changes or the reason why my databases are crashing so frequently ? I can also add more details about my server on demand.

**EDIT**

I have added mysql\_close($con) everywhere, but that has further increased problems for my website somehow.Connections is increasing exponentially in the result shown below :-

```
mysql> show status like '%onn%';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| Aborted_connects         | 48    |
| Connections              | 1634  |
| Max_used_connections     | 8     |
| Ssl_client_connects      | 0     |
| Ssl_connect_renegotiates | 0     |
| Ssl_finished_connects    | 0     |
| Threads_connected        | 4     |
+--------------------------+-------+
7 rows in set (0.00 sec)

```

Thanks !