Reputation: 196
I have;
Tested;
Persistent Connection in MySQL I faced an issue maximum connection exceed, so I noticed the Code Igniter do not close connection if you do not set pconnect to config to true in database.php. So, simplified that, it uses allow persistent connection if you set it true. So, I want to fix that issue and I find a solution that I need to set it false and it will close all connections automatically. I changed my configuration to disallow Persistent connections.
After I update persistent connection disabled. My app started to run properly and after 1 hour later, it crashed again because of a couple of errors that showed below and I fixed those errors with setting max_allow_package to maximum value in my.cnf for mariadb.
Warning --> Error while sending QUERY packet. PID=2434 Query error: MySQL server has gone away
Finally, I am still getting query package errors.
Packets out of order. Expected 0 received 1. Packet size=23
My server has 8GB ram (%25 used), 4 core x 2ghz (%10 used) I couldn't decide which configuration is the best option for now. I couldn't increase RAM, also %25 used of ram because a key buffer size is 1GB and it could get full use of ram instant jobs.
Can I;
Upvotes: 1
Views: 2019
Reputation: 142296
8GB ram --> innodb_buffer_pool_size = 5G.
200 qpm --> no problem. (200qps might be a challenge).
10 tables; 2 users --> not an issue.
persistent connections --> frill; not required.
key_buffer_size = 1G
? --> Why? You should not be using MyISAM. Change to 30M.
max_allow_package
--> What's that? Perhaps a typo for max_allow_packet
? Don't set that to more than 1% of RAM.
Packets out of order
--> sounds like a network glitch, not a database error.
MEDIUMINT
--> one byte smaller than INT
, so it is a small benefit when applicable.
Upvotes: 0