Hello! Sorry if posted in the wrong section but: I have a problem, that i'd like to address to you. We are creating an webapp that shows infos and statistics. And we have a problem about how to 'do right' our server configuration The thing is that our apps use crons to do few things, and crons sometimes blocks our database, and when that happens, whole application is frozen, which means no user input, no pages loading etc. What should we do to prevent this from happening? is there a way to mirror the database and hold two of them one for backend and one for frontend, or we should limit connections to the database, or maybe we should use some other method. Any help would be appreciated
How would cron be freezing the database? Just going out on a limb here, but I would suggest not using MyISAM as a storage engine and switch to Innodb which uses row level locking instead of table level locking. But just taking a wild guess at what's going on in your app.
I think jestep guessed it right. Locks and blocks are critical part of any RDBMS. use it wisely, try the hint provided by him.
hello, sorry I wasn't precise enough we do use InnoDB, by blocking a database I mean, database uses all given resources and stops answering to any queries/connections, since both crons and frontend needs to connect and pull or store data in the DB
If a cron-job bogs down the server and uses all resources, then you're in desperate need of a re-write. What does this cron-job do, exactly? There are settings, both in general server config and mysql-config that restricts simultaneous users, but it should be set fairly high (unless idiotic sysadmin).