500 - Internal server error when trying to open any survey in the admin panel

More
1 week 2 days ago #187601 by oleggorfinkel
Hi,

All of a sudden, I started getting this error when trying to open any survey from the list in the admin panel:

'500 - Internal server error: The table "{{conditions}}" for active record class "Condition" cannot be found in the database.'

I've been using this very same LimeSurvey installation (v3.17.7+190627) for months, and this had never happened before.

I've looked at my server error log and it's EMPTY. My surveys are working fine for the respondents, by the way; the problem is only in the Admin panel.

I have also tried to use the "Check data integrity" function on the Advanced menu, and got the following:

"CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tentokai_metamindful.lime_conditions' doesn't exist."

Please help!

Thanks,
Oleg.

Oleg G.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 week 2 days ago #187602 by oleggorfinkel
Okay, I think I was able to solve this issue, by grabbing the lime_conditions table from a mirror installation and importing it into the database on my main server, where that table was MISSING. I am mystified (and worried) as to how the table could have simply disappeared from the database! I certainly haven't done anything iffy or suspicious -- in fact, I hadn't even opened the Admin panel for the past month. Any possible explanation for this?

Oleg G.

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago #187609 by holch
Limesurvey won't just delete tables out of nothing, especially impossible if you haven't even opened the admin panel. How should this delete be triggered?

The only situation that I could think of where a table could be deleted (if something goes terribly wrong) would be an update.

Who else has access to your installation? Who is responsible for hosting? Who has access to your database?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago #187612 by oleggorfinkel

holch wrote: Limesurvey won't just delete tables out of nothing, especially impossible if you haven't even opened the admin panel. How should this delete be triggered?

The only situation that I could think of where a table could be deleted (if something goes terribly wrong) would be an update.

Who else has access to your installation? Who is responsible for hosting? Who has access to your database?


Only I have access... Now, over this past weekend, my hosting company (iFastNet) had a big outage due to a CEPH storage software upgrade that went badly. It seems very implausible, however, that a single table could have disappeared from the database while all the others remained intact. A very unsettling mystery...

Oleg G.

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago #187615 by holch
Hmmm, sounds weird. While I agree that it sounds weird that only one table was affected by this, it sounds a lot more plausible than LS starting to delete this table on it's own without even being used. Maybe they had to use a backup and when restoring the backup something went wrong?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago - 1 week 1 day ago #187629 by oleggorfinkel

holch wrote: Maybe they had to use a backup and when restoring the backup something went wrong?

Yes, that would be my hypothesis, too. I've already reported this to iFastNet support and they asked me for the name of the table and the database, so they can look into it and see what happened. I just hope there is no hidden damage there somewhere that could create an issue for me at some critical moment, when I least expect it...

Oleg G.
Last edit: 1 week 1 day ago by oleggorfinkel.

Please Log in or Create an account to join the conversation.

More
1 week 9 hours ago - 1 week 9 hours ago #187679 by oleggorfinkel
Question: what is the lime_sessions table used for? To try to figure out if anything substantial is missing from my database, I decided to compare a backup I took a few weeks ago with a fresh one, which is about half the size of the former. Looking at the backup files, I can see that in the one from early July, there is a bunch of massive inserts of what looks like binary data into the lime_sessions table (1MB - 2MB each), which are missing in the current backup. These are what accounts for the difference in size between the two files. I did do some cleaning up of old surveys, and I'd like to understand if those differences are due to that, rather than some random loss of data.

Oleg G.
Last edit: 1 week 9 hours ago by oleggorfinkel.

Please Log in or Create an account to join the conversation.

More
1 week 5 hours ago - 6 days 23 hours ago #187692 by holch
Not an expert, but as I understand it, Limesurvey can store sessions in cookies filesystem (PHP Session path)* and in the database. Looks like your installation stores the sessions in the database, which also fits with the size of 1-2MB each.

So I think the difference is just that at the time the backup was made, there were a lot of sessions stores in the database (any ongoing surveys at the time?).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last edit: 6 days 23 hours ago by holch. Reason: * corrected based on Jelo's comment.

Please Log in or Create an account to join the conversation.

More
1 week 5 hours ago #187693 by oleggorfinkel

holch wrote: Not an expert, but as I understand it, Limesurvey can store sessions in cookies and in the database. Looks like your installation stores the sessions in the database, which also fits with the size of 1-2MB each.

So I think the difference is just that at the time the backup was made, there were a lot of sessions stores in the database (any ongoing surveys at the time?).


Yes, I did, in fact, change to database-based sessions a while ago. I think that the backup from early July was done just before I cleaned out a bunch of old surveys that had remained opened but weren't being used anymore. So, the differences between that and the later backup are probably due to those sessions being deleted.

Thanks for replying, I really appreciate your help!

Cheers,
Oleg.

Oleg G.

Please Log in or Create an account to join the conversation.

More
1 week 1 hour ago #187699 by jelo

holch wrote: Not an expert, but as I understand it, Limesurvey can store sessions in cookies and in the database.

LimeSurvey can save the session in the filesystem (PHP session path) OR the database.
The cookie is the browserside identification for the session (an alternative to cookie would have been to attach an ID to the URL all the time). The session data is not saved in the cookie.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
6 days 23 hours ago #187704 by holch

LimeSurvey can save the session in the filesystem (PHP session path) OR the database.

Thank you for the correction (adapted above).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!