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 -0500

mldichter's avatar

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

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'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

@shorowit I looked for the sqlite.err file in my recycling bin, but couldn't find it. All I could find was the idf_file_name.err file, which I already posted. Is that its exact name?

I might not have it anymore. I kept rerunning the simulation and all the output files were overwritten. I'll try to remember to save a copy of all the output files the next time it happens.

mldichter's avatar mldichter  ( 2019-01-04 11:24:27 -0500 )edit

Yes, that should be the exact name. You should see the file even for a successful simulation.

Another thought is to try disabling any antivirus-like software. It may be scanning the file, which would prevent E+ from deleting it and writing to it.

shorowit's avatar shorowit  ( 2019-01-04 12:41:22 -0500 )edit

@shorowit I do not see any sqlite.err file generated. I reran one of the idf files in a separate folder to be sure. I attached an image of the outputted files in my post.

Unfortunately, I do not have authority over the antivirus on my computer. That is controlled by my university's IT that I work for.

mldichter's avatar mldichter  ( 2019-01-04 13:03:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
4

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

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

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
1

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

mldichter's avatar

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

Careers

Question Tools

1 follower

Stats

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

Seen: 1,198 times

Last updated: Jan 04 '19