Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Mar 17, 2011 12:41 pm 
Offline
Newbie

Joined: Thu Mar 17, 2011 12:33 pm
Posts: 3
So this morning my server started running out of memory due ( I assume ) to some code changes I made last night. I reverted some of the code changes, shut down and then restarted my Linode, and everything worked fine.

About an hour later, the same thing started happening. So I reverted a few more changes, and did a Reboot on the Linode. Now my MySQL server doesn't appear to want to start.

Code:
> mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
> start mysql
start: Job failed to start
> restart mysql
restart: Unknown instance:
> /etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql
start: Job failed to start



I didn't make any other changes to the server besides some minor changes to PHP files. I am still relatively new to sysadmin and am at a total loss for how I can get mysql up and running again, or why it would have stopped starting up in the first place.

I am running the LAMP StackScript available from the Linode StackScript repository.

Code:
Originally created using Ubuntu 10.04 LTS and 'LAMP Stack' StackScript at revision 160


Any help is greatly appreciated.


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 1:41 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
What's the content of /var/log/mysql/error.log

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 1:59 pm 
Offline
Newbie

Joined: Thu Mar 17, 2011 12:33 pm
Posts: 3
obs wrote:
What's the content of /var/log/mysql/error.log


/var/log/mysql/error.log was:

Code:
110317 14:43:34 [Note] Plugin 'FEDERATED' is disabled.
110317 14:43:35 InnoDB: Started; log sequence number 0 44233
110317 14:43:35 [Note] Event Scheduler: Loaded 0 events
110317 14:43:35 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.7' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110317 14:43:37 [ERROR] /usr/sbin/mysqld: Incorrect key file for table '/tmp/#sql_e83_0.MYI'; try to repair it
110317 15:36:49 [Note] /usr/sbin/mysqld: Normal shutdown

110317 15:36:49 [Note] Event Scheduler: Purging the queue. 0 events
110317 15:36:51 InnoDB: Starting shutdown...



I recently tried to run sudo -u mysql mysql and it added this to the error.log
Code:
110317 14:43:34 [Note] Plugin 'FEDERATED' is disabled.
110317 14:43:35  InnoDB: Started; log sequence number 0 44233
110317 14:43:35 [Note] Event Scheduler: Loaded 0 events
110317 14:43:35 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41-3ubuntu12.7'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
110317 14:43:37 [ERROR] /usr/sbin/mysqld: Incorrect key file for table '/tmp/#sql_e83_0.MYI'; try to repair it
110317 15:36:49 [Note] /usr/sbin/mysqld: Normal shutdown

110317 15:36:49 [Note] Event Scheduler: Purging the queue. 0 events
110317 15:36:51  InnoDB: Starting shutdown...
110317 17:46:18 [Note] Plugin 'FEDERATED' is disabled.
110317 17:46:18  InnoDB: Started; log sequence number 0 44233
110317 17:46:18 [ERROR] mysqld: Error writing file '/var/lib/mysql/li79-201.pid' (Errcode: 28)
110317 17:46:18 [ERROR] Can't start server: can't create PID file: No space left on device
110317 17:46:50 [Note] Plugin 'FEDERATED' is disabled.
110317 17:46:51  InnoDB: Started; log sequence number 0 44233
110317 17:46:51 [ERROR] mysqld: Error writing file '/var/lib/mysql/li79-201.pid' (Errcode: 28)
110317 17:46:51 [ERROR] Can't start server: can't create PID file: No space left on device


Am I out of disk space? Is that what is causing all of my problems?[/code]


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 2:21 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Looks like it run
Code:
df -h
to see your disk usage, run
Code:
du -h / | grep '.*[0-9][0-9]M'
to find directories over 10mb on your linode.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Mar 17, 2011 3:06 pm 
Offline
Newbie

Joined: Thu Mar 17, 2011 12:33 pm
Posts: 3
Disk space was indeed my problem. I added 5G from Extras and resized my disk image to give me time to figure out a better storage solution. Thank you for your help!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group