Op 11-jan-2010, om 1:15 heeft Nikolaus Rath het volgende geschreven
> Edzard Pasma <pasm...@concepts.nl> writes:
>> Op 10-jan-2010, om 19:25 heeft Nikolaus Rath het volgende geschreven:
>>
>>> Filip Navara <filip.nav...@gmail.com> writes:
>>>>> I am accessing the same database from several threads, each  
>>>>> using a
>>>>> separate connection. Shared cache is not enabled.
>>>>>
>>>>> When my program has been running for a while, I suddenly get an
>>>>> SQLITE_CANTOPEN error when I'm trying to open a database
>>>>> connection with
>>>>> a new thread. The database file, however, is definitively present
>>>>> and
>>>>> accessible.
>>>> Hi!
>>>>
>>>> Does "pragma journal_mode=truncate;" make any difference?
>>>> Is this on Windows?
>>>> Do you have TortoiseSVN installed on the same system?
>>>
>>> No to all questions, I'm afraid. Seems that my problem is a
>>> different one.
>>
>> Does your application attach at least 20 further databases within
>> each of the 15 connections?
>> Does it open at least 250 files any other way?
>>
>> If any yes, then you have too many open files!
>
> No, there is only one database for each connection. The idea with the
> open files may still be a good one though, I will look into that. But
> why should the limit be 250? On this system I have an ulimit of 1024
> open fds, and I guess that on other systems it would at least still be
> some power of 2.

The number of 250 was just a rough indication, taking into account  
already open database connections and other IO channels. I reasoned  
that if you have that many open files and get the particular error,  
it is almost sure it is caused by the open files limit. On my system  
that is 256. I had not expected it to vary so much. up to 8k on some  
enterprise Linux distribution.

Hope strace (see Roger Binns' post) will help you further. Also lsof  
may help.

regards, Edzard Pasma

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to