B4J Question server-exceptions after stresstest

schimanski

Well-Known Member
Licensed User
Longtime User
Last week, we made a stresstest of my instant messenger to check the server over several hours and hundreds of messages. There are some exceptions in the logs. I know, it is difficult to say something about it without more information, but I didn't have more. I got the logs from the admins and the wealth of data does not contain any information. Perhaps, there is someone who could give me a tip, what the problems could be. Thanks for any help..

After the SQLITE_CORRUPT-Exception, the server gots a partial failure. It wasn't longer able to push until restart. I'm using small sqlite-databases, which are initialized and changed many times.

B4X:
FATAL  - java.sql.SQLException: [SQLITE_CORRUPT]  The database disk image is malformed (database disk image is malformed)

FATAL  - java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: main)

FATAL  - java.sql.SQLException: [SQLITE_IOERR]  Some kind of disk I/O error occurred (disk I/O error)

FATAL  - org.eclipse.jetty.io.EofException: Early EOF

'This warning i think, is a problem with a wrong push-token.
WARN:oejs.DefaultServlet:qtp2051450519-2292:
java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
    at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166)
    at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
The problem is that SQLite was not made for concurrent connections, even in wal mod is not and industrial type database.

You should use MySQL, MariaDB or Sql Server for this kind of projects.

Idle timeout expired: 30000/30000 ms

This means that the database was expecting a connection to SQLite and this one never gave it.

The way SQLite works is: 1 writing user will block the database completly when he finish the database is going to be released, if a read-user tries to enter the database in this state it will wait for up to 5 seconds, if database is still busy it will throw an exception.

I do not remember how many read users can access the database but most likely it has a limit too.
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Thank you very much for your reply. So it seems, that all the exceptions above has to do with concurrent connections of my small sqlite databases. In normal use, the exceptions were not raised, only after a lot of traffic.
I now know, where i have to search...
 
Upvote 0
Top