Question

How to solve the following error and why i'm getting this.
Persistent UI failed to open file file://localhost/Users/ev_mac13/Library/Containers/com.xxxxx.testData/Data/Library/Saved%20Application%20State/com.xxxxx.testData.savedState/window_5.data: Too many open files (24)

I m using sqlite database in my applicatation. This error appearing inbetween running the application.

EDIT: The data was fetched and used in collection view and array controller. If i got the above error then i cant open sqlite database.

Assertion failure in -[SQLiteDBConnection executeQuery:], /Users/admin/Desktop/march14/feb22/ToolBox/ToolBoX/DBConnection/SQLiteDBConnection.m:186 2014-03-15 10:25:04.339 ToolBoX[2939:303] Error while creating add statement. 'unable to open database file'

EDIT #2:

i just typed lsof in osx terminal, it shows too many sqlite connections and close all connections. Now fixed.

Was it helpful?

Solution

I've run into this with permissions errors in my home folder.

However, if you're using a SQLite wrapper directly, it's possible it's leaking (as in memory leak) database/connection instances and/or not closing them properly when done, which means new connections are opened in addition each time the database is touched. Get familiar with Instruments (the "Leaks" instrument, specifically) if you're not already, then post the results if you're still stuck.

OTHER TIPS

can try in terminal:

xcode-select --rest
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top