Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Running out of connections

2 posts in General Discussion (old) Last posting was on 2008-08-29 07:08:23.0Z
Markus KARG Posted on 2008-08-29 07:07:37.0Z
From: "Markus KARG" <karg@quipsy.de>
Newsgroups: sybase.public.sqlanywhere
Subject: Running out of connections
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48b7a039$1@forums-1-dub>
Date: 29 Aug 2008 00:07:37 -0700
X-Trace: forums-1-dub 1219993657 10.22.241.152 (29 Aug 2008 00:07:37 -0700)
X-Original-Trace: 29 Aug 2008 00:07:37 -0700, vip152.sybase.com
X-Authenticated-User: panorama
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sqlanywhere:139
Article PK: 866586

According to the manual, SQL Anywhere 11 has no restriction on the number of
concurrent connections, neither in the "normal" nor in the developer's
edition. But in reality I found that there is such a restriction. When I am
opening connections in a loop, I run out of connections after about 2650
connections:

import ianywhere.ml.jdbcodbc.jdbc3.ASADataSource;

public class JdbcClient {

public static void main(String[] args) throws Exception {

final ASADataSource ds = new ASADataSource();

ds.setURL("jdbc:ianywhere:DSN=SQL Anywhere 11 Demo");

for (int i = 0; true; i++) {

System.out.println(i);

ds.getConnection().createStatement().execute("SELECT 1");

}

}

}


The result is:

2650

Exception in thread "main" java.sql.SQLException: [Sybase][ODBC

Driver][SQL Anywhere]Verbindungsfehler: Server gefunden, jedoch

Kommunikationsfehler


(In English that means: "Connection failure: Found server, but communication
fault").

The interesting thing is that between printing "2650" and printing the
exception, for about five to ten minutes just nothing happens -- the client
is just blocked, while dbsrv11.exe is pulling 50% of CPU resources. That is
rather strange, since actually there is nothing to work obviously! Also,
there is plenty of RAM left over (more than 1 GB is free on my test
machine)!

The connection is done using Shared Memory and default settings -- as you
can see I am just using the demo db but switched the engine to start from
dbeng11.exe to dbsrv11.exe before running the test program. So -gm is not
used, and according to the manual there is no default value for -gm!

Unfortunately I need to open far more concurrent connections in my actual
application. Can anybody tell me why that happens and what to do against it?

Thanks a lot!
Markus


Markus KARG Posted on 2008-08-29 07:08:23.0Z
From: "Markus KARG" <karg@quipsy.de>
Newsgroups: sybase.public.sqlanywhere
References: <48b7a039$1@forums-1-dub>
Subject: Re: Running out of connections
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48b7a067$1@forums-1-dub>
Date: 29 Aug 2008 00:08:23 -0700
X-Trace: forums-1-dub 1219993703 10.22.241.152 (29 Aug 2008 00:08:23 -0700)
X-Original-Trace: 29 Aug 2008 00:08:23 -0700, vip152.sybase.com
X-Authenticated-User: panorama
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sqlanywhere:140
Article PK: 866585

I forgot to mention, version is 11.0.0.1264.

"Markus KARG" <karg@quipsy.de> schrieb im Newsbeitrag
news:48b7a039$1@forums-1-dub...

> According to the manual, SQL Anywhere 11 has no restriction on the number
> of concurrent connections, neither in the "normal" nor in the developer's
> edition. But in reality I found that there is such a restriction. When I
> am opening connections in a loop, I run out of connections after about
> 2650 connections:
>
> import ianywhere.ml.jdbcodbc.jdbc3.ASADataSource;
>
> public class JdbcClient {
>
> public static void main(String[] args) throws Exception {
>
> final ASADataSource ds = new ASADataSource();
>
> ds.setURL("jdbc:ianywhere:DSN=SQL Anywhere 11 Demo");
>
> for (int i = 0; true; i++) {
>
> System.out.println(i);
>
> ds.getConnection().createStatement().execute("SELECT 1");
>
> }
>
> }
>
> }
>
>
> The result is:
>
> 2650
>
> Exception in thread "main" java.sql.SQLException: [Sybase][ODBC
>
> Driver][SQL Anywhere]Verbindungsfehler: Server gefunden, jedoch
>
> Kommunikationsfehler
>
>
> (In English that means: "Connection failure: Found server, but
> communication fault").
>
> The interesting thing is that between printing "2650" and printing the
> exception, for about five to ten minutes just nothing happens -- the
> client is just blocked, while dbsrv11.exe is pulling 50% of CPU resources.
> That is rather strange, since actually there is nothing to work obviously!
> Also, there is plenty of RAM left over (more than 1 GB is free on my test
> machine)!
>
> The connection is done using Shared Memory and default settings -- as you
> can see I am just using the demo db but switched the engine to start from
> dbeng11.exe to dbsrv11.exe before running the test program. So -gm is not
> used, and according to the manual there is no default value for -gm!
>
> Unfortunately I need to open far more concurrent connections in my actual
> application. Can anybody tell me why that happens and what to do against
> it?
>
> Thanks a lot!
> Markus
>