Hello Ditimar,

thank you for your question.

The following code sequence is the only one that issues queries to the database in the production context.
It is a EJB application, it does not share connections.

        ClientSession session = null;
        ClientQuery queryBaseX = null;
        String res = null;
        try {
            session = new ClientSession(this.serverIp, this.serverport, this.databaseLogin, this.databasePassword);
            session.execute("OPEN " + queryBuilder.getDatabaseName());
        } catch (Exception e) {
            LOG.error("on opening of the database " + queryBuilder.getDatabaseName(), e);
            status.setCode(StatusCode.couldNotOpenDatabase);
            return "";
        }
        try {
            queryBaseX = queryBuilder.buildQuery(session);
            res = queryBaseX.execute();
            if (LOG.isInfoEnabled()) {
                LOG.info(queryBaseX.info());
            }
            if (LOG.isDebugEnabled()) {
                LOG.debug(res);
            }
           
        } catch (Exception e) {
            LOG.error("", e);
        } finally {
            if (queryBaseX != null) {
                try {
                    queryBaseX.close();
                } catch (Exception e) {
                    LOG.error("cloing BaseX", e);
                }
            }
            if (session != null) {
                try {
                    session.close();
                } catch (Exception e) {
                    LOG.error("cloing BaseX", e);
                }
            }
        }

As far as I can see the session is closed each time.

What we have observed is, that the number of open files increases without (!) xquery requests from basex-clients.

With best regards,

Andreas

Am 11.05.2012 15:28, schrieb Dimitar Popov:
Could you please check if your application always closes the active client sessions, i.e.
the method org.basex.server.Session.close() is called?

Regards,
Dimitar

On May 11, 2012, at 10:59 AM, Andreas Rulle wrote:

Hello BaseX-Experts!

Let me first thank you who drive this fantastic BaseX project!

For the use of BaseX as a backend to a soap-webservice project we have seen
very encouraging load test results.

On the systems that is intended to become productive very soon we see on a daily basis
(on two database engines behind a load balancer) the following messages that terminate
the execution of the Basex-server.

Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de Version:
BaseX 7.2 Java: Sun  Microsystems Inc., 1.6.0_20 OS: Linux, amd64
Stack Trace: java.net.SocketException: Too many open files
java.net.PlainSocketImpl.socketAccept(Native Method) java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:375)
java.net.ServerSocket.implAccept(ServerSocket.java:470)
java.net.ServerSocket.accept(ServerSocket.java:438)
org.basex.BaseXServer.run(BaseXServer.java:164)
java.lang.Thread.run(Thread.java:636)

The error message occurs when there are no client requests to the server.
The load balancer might do some pinging.

Any feedback and hint to this message is highly welcome!

With best regards,

Andreas

--
Nexoma GmbH
Theodorus Weg 7
59755 Arnsberg

Geschäftsführer: Guido Sauerland
Sitz der Gesellschaft: Arnsberg
Registergericht: Arnsberg, HRB 9365

_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


-- 
Nexoma GmbH
Theodorus Weg 7
59755 Arnsberg

Tel.    + 49 (0) 52 51 1613-0
Fax     + 49 (0) 52 51 1613-99

mailto:andreas.rulle@nexoma.de

Geschäftsführer: Guido Sauerland
Sitz der Gesellschaft: Arnsberg
Registergericht: Arnsberg, HRB 9365