On 9 Mar 2020, at 2:16pm, David Raymond <david.raym...@tomtom.com> wrote:
> In general I believe the last connection tries to do a complete checkpoint > when it closes, and if it succeeds then it'll delete the -wal and -shm files. > If you have automatic checkpointing turned off (maybe you're doing regular > checkpoints from a separate dedicated process) then it's possible for all > connections to finish and close the database without error, but still have > those files sitting around because they haven't been checkpointed yet. If your .shm and .wal files still exist when no apps are accessing the database, the most likely cause is that at least one of the apps is not closing its connection correctly. If your app runs code to close connections, and the connections are still not closing properly, then the most likely cause is that you have a statement active when you close the connection. To make sure your statements are not active, make sure you call sqlite3_finalize() on each statement when you no longer need it. If you are not using the C library to execute SQLite calls, look for some equivalent in your SQLite library. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users