Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
HI
i have a centos server with dual core cpu and 2 gig RAM
just 4 sites hosted on it and a plesk for manage.
4 sites have around 15000 view and every minute update feed and save news in database.
but every 1 or 2 hour mysqld crashed and too slowly to show site contents.
but just when i restart mysqld service everything is okay...
what can i do for mysql for not crash?
thanks
No,
15,000 views per day.
and per 1 minute websites read and update their feeds, feeds store in mysql
------------------------
i checked /var/log/mysql.log and it's says nothing for fix :
tail -f :
130425 18:06:35 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130425 18:06:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130425 18:06:37 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
130425 18:06:37 [Warning] option 'table_cache': unsigned value 536870912 adjusted to 524288
130425 18:06:37 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072
130425 18:06:37 [Warning] option 'thread_cache_size': unsigned value 134217728 adjusted to 16384
130425 18:06:37 [Warning] Changed limits: max_open_files: 1024 max_connections: 50 table_cache: 482
130425 18:06:37 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
130425 18:06:37 InnoDB: Initializing buffer pool, size = 1.0G
130425 18:06:37 InnoDB: Completed initialization of buffer pool
130425 18:06:37 InnoDB: Started; log sequence number 250 282188107
130425 18:06:37 [Note] Event Scheduler: Loaded 0 events
130425 18:06:37 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.67-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
Have you tried things like changing your feeds to 2 minutes instead of 1?
If it's taking more than a minute to process and insert the data from these feeds then you'll be generating a "race" condition which will clog your database with requests.
Try also increasing the various buffer sizes in your my.cnf
Enable slow query logging and see if there's any queries that are taking a long time to run.
Half of your RAM is taken up by the buffer pool and you only allow 50 cxns at any time.
Have you tried monitoring top over a period to see what's going on, inc swap usage.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.