Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I tried to drop one of the databases on the server. That locked the entire server up so I stopped the mysql process via the console.

I restarted the server, started mysql and now it seems hanged on:

debian-sys-maint | localhost | | Query | 192 | Opening tables | select count(*) into @discard from information_schema.COLUMNS |

Not necessarily hanged, but this takes a long time to move to a different query.

The other databases seem locked but I see no locks in "show open tables".

Any idea what's going on and what I could try?

Thanks.

Edit: it seems like the locks are moving from database to database and table to table. I guess it's doing some kind of checks?

Edit2: I think I understand what's happening, the answer to why it's doing this is: Linux Mint trigger slowly query on mysql on system booting

share|improve this question
add comment

migrated from stackoverflow.com May 12 '13 at 10:50

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

Your conclusion is correct about the debian-sys-maint process. That's not technically part of MySQL and can be disabled.

Your DROP DATABASE gave the appearance of a lockup because opening/closing/dropping tables uses a global mutex in MySQL -- only one such operation can be happening at any point in time and every other similar operation has to wait. That wouldn't really be a problem, except that MySQL has to wait for the filesystem to report that the underlying table file(s) has been deleted, which can take a significant amount of time.

Dropping the tables individually won't eliminate the problem, but will spread out multiple, shorter blocking events over more time and be potentially less disruptive... or you might be able to use a different filesystem if dropping big tables is a frequent requirement for your environment:

http://www.mysqlperformanceblog.com/2009/06/16/slow-drop-table/ http://stackoverflow.com/questions/150058/mysql-drop-database-takes-time-why

share|improve this answer
    
Thanks .. I'll have to go with the drop table solution. –  sirrocco May 13 '13 at 15:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.