Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

SQL Error

  • wf_121
  • wf_121's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #201633 by wf_121
SQL Error was created by wf_121
Hello there,

Recently, one of our users got a SQL error while conducting a survey. We use version 2.72.3+171020. She received an e-mail with the following (I'm translating it to English):
Code:
Subject: Error saving results
 
An error happened while trying to save a response in the survey <span style="font-size:20px;">Survey name</span> - 299365
 
DATA TO BE INSERTED:
token: N/A
299365X218X4187:
299365X218X4357: A2
299365X218X4190: A3
299365X218X4191: N/A
299365X218X4192: N/A
299365X218X4365: A1
299365X218X4188: A8
299365X218X4361: A3
299365X218X4358: A2
299365X218X4364: A2
299365X221X4249:
299365X221X4214SQ001: A5
299365X221X4214SQ002: A4
 
(goes on and on...)
 
SQL CODE THAT PRESENTED THE ERROR:
 
 
UPDATE {{survey_299365}} SET "lastpage"=1, "datestamp"='2020-06-22 11:54:21', "299365X231X4471"='', "299365X231X4415"='A3', "299365X231X4416"='A4', "299365X231X4418"='A5', "299365X231X4417"='A5', "299365X231X4419"='A1', "299365X231X4420"=NULL, "299365X231X4421"='A1', "299365X231X4422"='A6', "299365X231X4423"='A3', "299365X231X4424"='' WHERE ID=3160
 

Apache logs show nothing. Enabling debug mode to show errors on screen seems awkward since it's a production environment and it seems the error happens following some external action. I couldn't find any logs inside LimeSurvey folders, including "limesurvey/tmp/runtime/application.log", which is mentioned in the wiki. Any advice? Are these messages supposed to be recorded on some log file?

Thank you!
The topic has been locked.
  • wf_121
  • wf_121's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #201756 by wf_121
Replied by wf_121 on topic SQL Error
Nevermind this problem. Checking the database logs solved our issue.

Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #201775 by DenisChenu
Replied by DenisChenu on topic SQL Error

wf_121 wrote: Nevermind this problem. Checking the database logs solved our issue.

Thanks!

Can you explain what happen ?

It cazn be intersteting to have a clean way to avoid bad submit.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • wf_121
  • wf_121's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #201826 by wf_121
Replied by wf_121 on topic SQL Error
We didn't really "solve the issue", as I said before, we simply put the problem aside since it seemed it was very localized, and not worth investigating further (for now...). But, what we were told was that a user was testing a survey and he was basically "messing around" too much, like taking too long to close the survey, changing the responses several times, etc. No clue if that's what really caused it, though.

By the way, could you confirm that "limesurvey/tmp/runtime/application.log" is the location logs are supposed to go? I find it strange that there's no file at all like that on our servers.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #201830 by DenisChenu
Replied by DenisChenu on topic SQL Error
"limesurvey/tmp/runtime/application.log" is the default file,

But yiu need to activate manually the log :
manual.limesurvey.org/Optional_settings#Logging_settings

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose