Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

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

asked 2019-01-03 10:40:04 -0600

mldichter gravatar image

updated 2019-01-08 09:15:29 -0600

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

edit retag flag offensive 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 gravatar imageJulien Marrec ( 2019-01-03 10:41:54 -0600 )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 gravatar imageMatthewSteen ( 2019-01-03 11:03:55 -0600 )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 gravatar imagemldichter ( 2019-01-04 10:11:05 -0600 )edit

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

mldichter gravatar imagemldichter ( 2019-01-04 10:11:59 -0600 )edit

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

shorowit gravatar imageshorowit ( 2019-01-04 11:06:12 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2019-01-04 12:04:23 -0600

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.

edit flag offensive delete link more
1

answered 2019-01-04 10:15:20 -0600

mldichter gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2019-01-03 10:40:04 -0600

Seen: 185 times

Last updated: Jan 04