Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Internal Server Error" - When attempting to access 'Sensors' page. #236

Closed
Ryobidelacroix opened this issue Apr 8, 2017 · 6 comments
Closed

Comments

@Ryobidelacroix
Copy link

Mycodo Issue Report:

  • Specific Mycodo Version: 5.0.21

Problem Description

Please list:

  • Clicking on 'sensors' tab will show error message:

"Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

Errors

  • I will include crash logs as text files, however, possible cause shown in Daemon log:

"ERROR - Error raised in session_scope. Session will be rolled back: db_uri='sqlite:////home/pi/Mycodo/mycodo/../databases/mycodo.db', error='(sqlite3.OperationalError) database is locked [SQL: u'SELECT alembic_version.version_num AS alembic_version_version_num \nFROM alembic_version\n LIMIT ? OFFSET ?'] [parameters: (1, 0)]'"

LOG_Http.txt
LOG_Daemon.txt

Rebooting does not resolve.

This is a recent fresh install (2-3 days old)

@kizniche
Copy link
Owner

kizniche commented Apr 9, 2017

A database lock error occurs when a process is writing to the SQL database file and requires exclusive access to it. This normally takes a fraction of a second and the database is then able to be opened by other processes.

@kizniche
Copy link
Owner

kizniche commented Apr 9, 2017

Your daemon log indicates this error happened once. The next daemon restart it did not happen (i.e. the issue was not present).

Are you saying you can only not access the Sensor page?

@kizniche
Copy link
Owner

kizniche commented Apr 9, 2017

Looking at your HTTP log, the issue appears to be the code not recognizing any DS18B20 sensor(s) you previously added. Looking into the offending code and working on a fix.

@kizniche
Copy link
Owner

kizniche commented Apr 9, 2017

I just committed a fix for this issue and released v5.0.22. Update and let me know if the issue persists. Thanks for the bug report.

@Ryobidelacroix
Copy link
Author

Hi Kyle,

That's correct; Only the sensor page is affected. It seems I missed a chunk of my Daemon log when pasting it into the txt file. I can confirm it was occurring more than once.

Thanks for the fix, I'll update when I get home and let you know how it goes.

@Ryobidelacroix
Copy link
Author

Issue resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants