First time here? Check our help page!
2

** Fatal ** The SQLite database failed to open.

I'm getting an intermittent failure using ep-launch to run a energyplus 9.0 simulation. Sometimes no err file is generated, and sometimes this err file is generated.

Link to file showing sqlite error

Program Version,EnergyPlus, Version 9.0.1-bb7ca4f0da, YMD=2019.01.03 08:16,
   **  Fatal  ** The SQLite database failed to open.
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=0
   ..... Last severe error=
   ************* Warning:  Node connection errors not checked - most system input has not been read (see previous warning).
   ************* Fatal error -- final processing.  Program exited before simulations began.  See previous error messages.
   ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 0 Severe Errors; Elapsed Time=00hr 00min  1.03sec

I have no idea what's causing it. Everything was running fine yesterday. I'm hoping it just goes away, but any idea what I can do to troubleshoot?


In response to @shorowit's comment

image description

Here is the whole err file. Not all of it was overwritten, and there are a ton of characters notepad++ is displaying as NUL.

image description

mldichter's avatar
2.6k
mldichter
asked 2019-01-03 10:40:04 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2019-01-08 09:15:29 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Are you working on a network drive or cloud or something? The quickest thing you can do is to go delete the SQL file before you relaunch the simulation...

Julien Marrec's avatar Julien Marrec (2019-01-03 10:41:54 -0500) edit

Also, make sure the SQL file isn't open in another program or process (e.g. script). OpenStudio won't overwrite it during a sim if that's the case.

MatthewSteen's avatar MatthewSteen (2019-01-03 11:03:55 -0500) edit

@Julien Marrec I am running energyplus on my personal computer locally with local file access. I tried deleting all the files related to the simulation besides the idf file. The problem is still intermittent.

mldichter's avatar mldichter (2019-01-04 10:11:05 -0500) edit

@MatthewSteen As far as I can tell, the file is not open anywhere else. Also, I am not using openstudio.

mldichter's avatar mldichter (2019-01-04 10:11:59 -0500) edit

Is there any additional information in the sqlite.err file?

shorowit's avatar shorowit (2019-01-04 11:06:12 -0500) edit
add a comment see more comments

2 Answers

4

Digging into the source code, this fatal error line only appears in SQLiteProcedures.cc if the variable ok is set to false. Above this line, ok is initialized to true, and then followed by series of 5 if checks that can reset ok to false and result in the fatal error you are seeing. The order of these checks are:

  • Test if EnergyPlus can write to the SQLite error file
  • Test if EnergyPlus can create a new SQLite file
  • Test if EnergyPlus can write to the SQLite file
  • Test if the SQLite file is locked
  • Open the SQLite file so that EnergyPlus can write simulation outputs to it

I would recommend opening the SQL file after a failed run to search for any error messages. You can open this in a text editor, but it would be easier to navigate in a database GUI. A free tool like sqliteman, or a free trial of a commercial tool like RazorSQL are some options.

@Kyle Benne seems to be the last person to alter this source code, maybe he can chime in. It is definitely interesting that just by running the same IDF a number of times, this fatal error eventually goes away on its own. I'm guessing that for the initial runs that fail, the SQLite file is locked or EnergyPlus cannot open it.

Aaron Boranian's avatar
14.1k
Aaron Boranian
answered 2019-01-04 12:04:23 -0500
edit flag offensive 0 remove flag delete link

Comments

@Aaron Boranian Btw, the problem seems to occur when I am running an Energyplus Group File and another Energyplus simulation. The simulations running from the Energyplus Group File run iteratively two at a time, and the single simulation makes three simulations running at once. Doesn't seem to always fail, but fairly often. Any chance the three simulations are trying to share sqlite or another resource and there's a conflict?

mldichter's avatar mldichter (2019-01-18 10:09:45 -0500) edit

It would help to see the detailed error message pointing to which of the 5 if checks failed, but it seems there are a bunch of null characters in the run4.err file where that might have been. Question 55636 pointed to 'can't get exclusive lock on existing database.'

simular's avatar simular (2024-04-23 18:56:48 -0500) edit
add a comment see more comments
1

Not a great workaround, but here's what I did. The problem is intermittent, so I just kept running the simulations that failed until the "The SQLite database failed to open" error didn't occur and the simulation ran to completion. The failed runs tended to fail very quickly, so not a huge waste of time. Still no idea what causes it though.

mldichter's avatar
2.6k
mldichter
answered 2019-01-04 10:15:20 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments