pdo - Mysql often crashes -


my mysql server crashes, , need restart mysql using "service mysqld start" command. check mysql error log file.

130807 22:59:47 mysqld_safe number of processes running now: 0 130807 22:59:47 mysqld_safe mysqld restarted 130807 22:59:47 [note] plugin 'federated' disabled. 130807 22:59:47 innodb: innodb memory heap disabled 130807 22:59:47 innodb: mutexes , rw_locks use gcc atomic builtins 130807 22:59:47 innodb: compressed tables use zlib 1.2.5 130807 22:59:47 innodb: using linux native aio 130807 22:59:47 innodb: initializing buffer pool, size = 128.0m innodb: mmap(137363456 bytes) failed; errno 12 130807 22:59:47 innodb: completed initialization of buffer pool 130807 22:59:47 innodb: fatal error: cannot allocate memory buffer pool 130807 22:59:47 [error] plugin 'innodb' init function returned error. 130807 22:59:47 [error] plugin 'innodb' registration storage engine failed. 130807 22:59:47 [error] unknown/unsupported storage engine: innodb 130807 22:59:47 [error] aborting  130807 22:59:47 [note] /usr/libexec/mysqld: shutdown complete  130807 22:59:47 mysqld_safe mysqld pid file /var/run/mysqld/mysqld.pid ended 

i have 10,000 users , have database have 10,000 tables. tables used recording user status. and, when create new user table, use following code pdo.

$statustable = "status_".$uid; $qstr = "create table if not exists `status`.`$statustable` (     `prim_id` int( 5 ) not null auto_increment primary key,     `message` varchar( 600 ) character set utf8 collate utf8_unicode_ci not null,     `created_time` timestamp not null default current_timestamp ) engine = innodb"; $db->query($qstr); 

does code cause mysql crash? use ec2 instance 615mb ram. thanks!!

aside bad database design, question/problem seems have been posted , answered before.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -