Re: [Koha] Sessions table corrupt in Koha 3.0
Edward, Drop the table then recreate it. Your users will have to log in again, but that's it. I'm not sure that will reclaim the disk space, though. Regards, Jared 2012/1/13 ed c > I am trying to work on a small, older Koha (3.0.2)install that is not > longer working. Koha is having issues connecting to the database after a > problem with diskspace. While checking the Mysql and log files, I've come > across with a problem with the "sessions" table in Koha. a CHECK TABLES on > it or a REPAIR just hangs forever. They have backups so I should be able to > restore the whole database (or possibly just this table) but before I do, > does anyone have any other alternative solutions? What does this table do? > > Thanks, > > Edward > > ___ > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > http://lists.katipo.co.nz/mailman/listinfo/koha > > -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcam...@cpbibliography.com (web) http://www.cpbibliography.com/ ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
The sessions table tracks logins to the system, and can drastically slow your system down if it gets too large. You can safely truncate it entirely; doing so will disconnect anyone presently logged in but it sounds like you can’t log in at the moment anyway. There is a script (misc/cronjobs/cleanup_database.pl) which has an option to clear the table overnight as a cron job, to keep it from getting too big. Jane Wagner Senior Project Manager LibLime, a division of PTFS Content Management and Library Solutions 11501 Huff Court North Bethesda, MD 20895 (301) 654-8088 x 151 jwag...@liblime.com *From:* koha-boun...@lists.katipo.co.nz [mailto: koha-boun...@lists.katipo.co.nz] *On Behalf Of *ed c *Sent:* Friday, January 13, 2012 11:57 AM *To:* koha@lists.katipo.co.nz *Subject:* [Koha] Sessions table corrupt in Koha 3.0 I am trying to work on a small, older Koha (3.0.2)install that is not longer working. Koha is having issues connecting to the database after a problem with diskspace. While checking the Mysql and log files, I've come across with a problem with the "sessions" table in Koha. a CHECK TABLES on it or a REPAIR just hangs forever. They have backups so I should be able to restore the whole database (or possibly just this table) but before I do, does anyone have any other alternative solutions? What does this table do? Thanks, Edward ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
Thanks Jared. This is probably my solution, however, I can't seem to drop this table. This is probably a basic mysql question, but how can I force a drop or remove a lock? When I try to drop the table, it just sits there waiting for the table: mysql> show processlist; ++---+---+--+-+--+---+-+ | Id | User | Host | db | Command | Time | State | Info | ++---+---+--+-+--+---+-+ | 7 | kohaadmin | localhost | koha | Query | 31 | Waiting for table | drop table sessions | | 8 | kohaadmin | localhost | koha | Query | 0 | NULL | show processlist | ++---+---+--+-+--+---+-+ 2 rows in set (0.00 sec) mysql> IS there a way to "force the drop" or unlock the table? I am having no luck searching google. Edward From: Jared Camins-Esakov To: ed c Cc: "koha@lists.katipo.co.nz" Sent: Friday, January 13, 2012 12:01 PM Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 Edward, Drop the table then recreate it. Your users will have to log in again, but that's it. I'm not sure that will reclaim the disk space, though. Regards, Jared 2012/1/13 ed c I am trying to work on a small, older Koha (3.0.2)install that is not longer working. Koha is having issues connecting to the database after a problem with diskspace. While checking the Mysql and log files, I've come across with a problem with the "sessions" table in Koha. a CHECK TABLES on it or a REPAIR just hangs forever. They have backups so I should be able to restore the whole database (or possibly just this table) but before I do, does anyone have any other alternative solutions? What does this table do? > > >Thanks, > > > >Edward > >___ >Koha mailing list http://koha-community.org >Koha@lists.katipo.co.nz >http://lists.katipo.co.nz/mailman/listinfo/koha > > -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcam...@cpbibliography.com (web) http://www.cpbibliography.com/___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
Okay, I got this part fixed. I managed to drop the table by starting mysql using mysqld_safe. Still need to create the table though, hopefully that will work. Edward From: ed c To: Jared Camins-Esakov Cc: "koha@lists.katipo.co.nz" Sent: Friday, January 13, 2012 1:16 PM Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 Thanks Jared. This is probably my solution, however, I can't seem to drop this table. This is probably a basic mysql question, but how can I force a drop or remove a lock? When I try to drop the table, it just sits there waiting for the table: mysql> show processlist; ++---+---+--+-+--+---+-+ | Id | User | Host | db | Command | Time | State | Info | ++---+---+--+-+--+---+-+ | 7 | kohaadmin | localhost | koha | Query | 31 | Waiting for table | drop table sessions | | 8 | kohaadmin | localhost | koha | Query | 0 | NULL | show processlist | ++---+---+--+-+--+---+-+ 2 rows in set (0.00 sec) mysql> IS there a way to "force the drop" or unlock the table? I am having no luck searching google. Edward From: Jared Camins-Esakov To: ed c Cc: "koha@lists.katipo.co.nz" Sent: Friday, January 13, 2012 12:01 PM Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 Edward, Drop the table then recreate it. Your users will have to log in again, but that's it. I'm not sure that will reclaim the disk space, though. Regards, Jared 2012/1/13 ed c I am trying to work on a small, older Koha (3.0.2)install that is not longer working. Koha is having issues connecting to the database after a problem with diskspace. While checking the Mysql and log files, I've come across with a problem with the "sessions" table in Koha. a CHECK TABLES on it or a REPAIR just hangs forever. They have backups so I should be able to restore the whole database (or possibly just this table) but before I do, does anyone have any other alternative solutions? What does this table do? > > >Thanks, > > > >Edward > >___ >Koha mailing list http://koha-community.org >Koha@lists.katipo.co.nz >http://lists.katipo.co.nz/mailman/listinfo/koha > > -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcam...@cpbibliography.com (web) http://www.cpbibliography.com/ ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
A little late of an update, but for the archives, dropping and then recreating the table fixed the problem. Edward -- Edward M. Corrado On Jan 13, 2012, at 12:52, ed c wrote: > Okay, I got this part fixed. I managed to drop the table by starting mysql > using mysqld_safe. Still need to create the table though, hopefully that will > work. > > Edward > > From: ed c > To: Jared Camins-Esakov > Cc: "koha@lists.katipo.co.nz" > Sent: Friday, January 13, 2012 1:16 PM > Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 > > Thanks Jared. This is probably my solution, however, I can't seem to drop > this table. > > This is probably a basic mysql question, but how can I force a drop or remove > a lock? When I try to drop the table, it just sits there waiting for the > table: > > > mysql> show processlist; > ++---+---+--+-+--+---+-+ > | Id | User | Host | db | Command | Time | State | > Info| > ++---+---+--+-+--+---+-+ > | 7 | kohaadmin | localhost | koha | Query | 31 | Waiting for table | > drop table sessions | > | 8 | kohaadmin | localhost | koha | Query |0 | NULL | > show processlist| > ++---+---+--+-+--+---+-+ > 2 rows in set (0.00 sec) > > mysql> > > IS there a way to "force the drop" or unlock the table? I am having no luck > searching google. > > Edward > > > > From: Jared Camins-Esakov > To: ed c > Cc: "koha@lists.katipo.co.nz" > Sent: Friday, January 13, 2012 12:01 PM > Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 > > Edward, > > Drop the table then recreate it. Your users will have to log in again, but > that's it. I'm not sure that will reclaim the disk space, though. > > Regards, > Jared > > 2012/1/13 ed c > I am trying to work on a small, older Koha (3.0.2)install that is not longer > working. Koha is having issues connecting to the database after a problem > with diskspace. While checking the Mysql and log files, I've come across with > a problem with the "sessions" table in Koha. a CHECK TABLES on it or a REPAIR > just hangs forever. They have backups so I should be able to restore the > whole database (or possibly just this table) but before I do, does anyone > have any other alternative solutions? What does this table do? > > Thanks, > > Edward > > ___ > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > http://lists.katipo.co.nz/mailman/listinfo/koha > > > > > -- > Jared Camins-Esakov > Bibliographer, C & P Bibliography Services, LLC > (phone) +1 (917) 727-3445 > (e-mail) jcam...@cpbibliography.com > (web) http://www.cpbibliography.com/ > > > > > ___ > Koha mailing list http://koha-community.org > Koha@lists.katipo.co.nz > http://lists.katipo.co.nz/mailman/listinfo/koha > > ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
On 2012-01-14, at 6:01 AM, Jared Camins-Esakov wrote: > Edward, > > Drop the table then recreate it. Your users will have to log in again, but > that's it. I'm not sure that will reclaim the disk space, though. > just curious, why not just truncate the table? PGP.sig Description: This is a digitally signed message part ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
Truncating should work fine, but I saw somewhere (I think in the e-mail archives not positive), that it could take longer. I'm not sure that is true or not since I didn't try it. The advantage to truncate though would be I wouldn't have had to look up how to recreate the table. Edward From: Mason James To: Jared Camins-Esakov Cc: ed c ; "koha@lists.katipo.co.nz" Sent: Friday, January 13, 2012 10:22 PM Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 On 2012-01-14, at 6:01 AM, Jared Camins-Esakov wrote: > Edward, > > Drop the table then recreate it. Your users will have to log in again, but > that's it. I'm not sure that will reclaim the disk space, though. > just curious, why not just truncate the table?___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
On 2012-01-14, at 6:14 PM, ed c wrote: > Truncating should work fine, but I saw somewhere (I think in the e-mail > archives not positive), that it could take longer. I'm not sure that is true > or not since I didn't try it. The advantage to truncate though would be I > wouldn't have had to look up how to recreate the table. > > Edward > From: Mason James > To: Jared Camins-Esakov > Cc: ed c ; "koha@lists.katipo.co.nz" > > Sent: Friday, January 13, 2012 10:22 PM > Subject: Re: [Koha] Sessions table corrupt in Koha 3.0 > > > On 2012-01-14, at 6:01 AM, Jared Camins-Esakov wrote: > > > Edward, > > > > Drop the table then recreate it. Your users will have to log in again, but > > that's it. I'm not sure that will reclaim the disk space, though. > > > > > just curious, why not just truncate the table? aaah, that Q was for Jared... :) but answering my own question, i guess its because for the default inno-db config for mysql, a truncate wont delete the existing space for that table - where as a drop/create will PGP.sig Description: This is a digitally signed message part ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Sessions table corrupt in Koha 3.0
Mason, On Sat, Jan 14, 2012 at 3:57 AM, Mason James wrote: > > > Truncating should work fine, but I saw somewhere (I think in the e-mail > archives not positive), that it could take longer. I'm not sure that is > true or not since I didn't try it. The advantage to truncate though would > be I wouldn't have had to look up how to recreate the table. > >> just curious, why not just truncate the table? > > aaah, that Q was for Jared... :) > > but answering my own question, i guess its because for the default inno-db > config for mysql, a truncate wont delete the existing space for that table > - where as a drop/create will That was my reasoning. It's possible that was unnecessary, but given that the problems all started when the system ran out of disk space, it seemed like a worthwhile precaution. Regards, Jared -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcam...@cpbibliography.com (web) http://www.cpbibliography.com/ ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha