Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 15 total
Thread F/S & C/S together
Wed, Sep 10 2014 4:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Optimus (i7) 8Gb RAM, W7x64

PC: Dell Vostro 1700 RAM: 4Gb,W7x64


Delphi 2006 SP2
ElevateDB 2.17b1 non-unicode



I'm thinking of moving to an all wireless LAN. Currently I have wired connections in my office and wireless in the rest of the house. The speed with which my main app runs over wireless in F/S mode is "not good" so I thought I'd finally try C/S.

My problem is that I thought C/S and F/S would play nicely together. Unfortunately not so.

---------------------------
ElevateDB Manager
---------------------------
ElevateDB Error #504 The maximum number of concurrent sessions (5) has been reached.
---------------------------
OK  
---------------------------

On my Optimus I get this when I start my F/S, then start the server (doesn't matter if its 64 bit or 32 bit) and then try and open the tables in EDBManager using a C/S session.

Even weirder, on the Dell I get told its 7 sessions not 5

My understanding was that F/S couldn't manage the number of connections, and even if it could why should that count towards the concurrent sessions in the server.

Anyone have an idea of what's going on?

Roy Lambert
Thu, Sep 11 2014 10:34 AMPermanent Link

Barry

Roy,

The F/S connection does NOT count against the # of server connections.
In fact the server doesn't know (or can't tell us) if the F/S is connected.

What you are experiencing may be related to server connections that are no longer there but the server has not yet disconnected because the timeout has not been reached.

To see what is connected to the server, run this from EDBMgr:
select * from configuration.serversessions!

This tells you who has a table/object locked/shared:
select * from configuration.serversessionlocks order by objectname! -- where objectname='mytablename'!

Some misc stuff:

select * from configuration.logevents!
select * from configuration.serversessionstatistics!
--disconnect server session 4;

To manually get rid of sessions:
remove server session 3!

Hope this helps.
Barry
Thu, Sep 11 2014 11:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Barry

>The F/S connection does NOT count against the # of server connections.
>In fact the server doesn't know (or can't tell us) if the F/S is connected.

This is my understanding as well, and what I've told people many times.

>What you are experiencing may be related to server connections that are no longer there but the server has not yet disconnected because the timeout has not been reached.

Yes but this is the very first time the server has been run on the Optimus

I've now done a bit more experimentation

Start EDBServer, start EDBmanger, query the database - only the one connection. Open my app (TfR) - things still working. Stop and restart the service - things still working. Close everything. I'm going to have to do things a few times just to make sure I have the sequence right, but right now the next stages were Open TfR, Move around in there a bit (which opens tables) then load EDBServer, open it up and click start service

---------------------------
ElevateDB Server (Win64)
---------------------------
ElevateDB Error #504 The maximum number of concurrent sessions (7) has been reached.
---------------------------
OK  
---------------------------

If your theory is right then EDBServer is somehow keeping connections open after its been shut down (ok it is sort of possible since I didn't power the PC down).

I then noticed I had two copies of TfR open. Closed one and EDBServer would start. Opened a second instance of TfR and EDBService minimised itself and now refuses to talk to me at all. Opening EDBManager and trying to access the data via c/s I get

---------------------------
ElevateDB Manager
---------------------------
ElevateDB Error #1100 A connection to the server at '127.0.0.1' cannot be established ('Socket error: No connection could be made because the target machine actively refused it.
(10061), on API 'connect'')
---------------------------
OK  
---------------------------

I knew there was a good reason I stuck with f/s all these years Frown

Come on you mod who've been using c/s for ages - HELP!

Roy
Thu, Sep 11 2014 12:36 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/11/2014 11:37 AM, Roy Lambert wrote:
> Start EDBServer, start EDBmanger, query the database - only the one connection. Open my app (TfR) - things still working. Stop and restart the service - things still working. Close everything. I'm going to have to do things a few times just to make sure I have the sequence right, but right now the next stages were Open TfR, Move around in there a bit (which opens tables) then load EDBServer, open it up and click start service

Out of curiosity does you app use background threads that use EDB ?
AFAIk each one of those requires a separate session and counts as
separate connection.

BTW - I got lost with the steps above when you were opening and app and
starting service after (does that mean your app was using F/S and then
switched to C/S?!).

> If your theory is right then EDBServer is somehow keeping connections open after its been shut down (ok it is sort of possible since I didn't power the PC down).

I believe this is only case if you don't cleanly disconnect. The other
reason could be if your WiFi is not stable and has an outage so your app
never closes its connections. Setting a fairly aggressive timeouts
should help with that (i found this article useful myself :
http://www.elevatesoft.com/articles?action=view&category=edb&article=connections_disconnections_reconnections)


> I then noticed I had two copies of TfR open. Closed one and EDBServer would start. Opened a second instance of TfR and EDBService minimised itself and now refuses to talk to me at all. Opening EDBManager and trying to access the data via c/s I get
> ---------------------------
> ElevateDB Manager
> ---------------------------
> ElevateDB Error #1100 A connection to the server at '127.0.0.1' cannot be established ('Socket error: No connection could be made because the target machine actively refused it.
> (10061), on API 'connect'')

It sounds like EDB server has crashed.  The error message generally
indicates "nobody is listening" which would be consistent with the edb
server not restoring from tray.

I'm little unclear on your F/S and C/S mix here but generally if you use
edb server then only F/S i would even consider is local F/S only (app on
same machine as edb server and db locally as well).

Raul
Thu, Sep 11 2014 12:58 PMPermanent Link

Barry

Roy Lambert wrote:

>>What you are experiencing may be related to server connections that are no longer there but the server has >not yet disconnected because the timeout has not been reached.

>Yes but this is the very first time the server has been run on the Optimus

I assume your application is single threaded, otherwise each thread has its own connection to the DB.

>I've now done a bit more experimentation

Start EDBServer, start EDBmanger, query the database - only the one connection. Open my app (TfR) - things still working. Stop and restart the service - things still working. Close everything. I'm going to have to do things a few times just to make sure I have the sequence right, but right now the next stages were Open TfR, Move around in there a bit (which opens tables) then load EDBServer, open it up and click start service<

So your TfR app connected using Local Connection???
Because you say "Open TfR, Move around in there a bit (which opens tables) then load EDBServer, open it up and click start service" tells me you ran your TfR app and opened tables locally, then started the EDBServer. Because you can't open database tables via C/S mode when the EDBServer isn't running.

Are you running the EDBServer in the system tray or as a Service? You normally only have one EDBServer running at a time (unless you need 2 EDBServers running and I don't think you want that). You can't run 2 EDBServers if they are using the same port.

When you run EDBServer as a service you won't have any GUI in the system tray and have no way of communicating with it except via EDBMgr. If on the other hand you have EDBServer running in the system tray then you must stop the EDBServer service, otherwise the two will try and use the same port.

On my app's login screen I have an advanced tab where I give the user the choice of connecting to the C/S or as a local connection. Is that what you're doing?

>If your theory is right then EDBServer is somehow keeping connections open after its been shut down (ok it is sort of possible since I didn't power the PC down).<
If your app closes normally, it should disconnect from the server. I suppose you could explicitly close the database, connection, and engine when your datamodule is destroyed. This will give you a chance to set up a breakpoint to step through it and observe in EDBMgr that the connection is closed immediately.


>I then noticed I had two copies of TfR open. Closed one and EDBServer would start. Opened a second instance of TfR and EDBService minimised itself and now refuses to talk to me at all. <

"EDBService minimised itself and now refuses to talk to me at all."
Hmm. I've seen that happen when a bloke minimizes (or forgets) an anniversary. LOL

I think when you said "Closed one and EDBServer would start" you meant the EDBServer then allowed connections. EDBServer should always be running in the Windows Services window. If you have the EDBServer Service stopping and starting on its own accord, then that is definitely not normal.


>Opening EDBManager and trying to access the data via c/s I get

>
---------------------------
ElevateDB Manager
---------------------------
ElevateDB Error #1100 A connection to the server at '127.0.0.1' cannot be established ('Socket error: No connection could be made because the target machine actively refused it.
(10061), on API 'connect'')
<

I would leave EDBMgr open all the time so you can check who is connecting.
This problem might occur if you have the server configured to only allow encrypted connections and your client is not using encryption so the server refuses to allow the client to authenticate.

>I knew there was a good reason I stuck with f/s all these years Frown<
It is time you ventured out of your F/S house and into the C/S world. It will definitely be worth the effort.

Barry
Thu, Sep 11 2014 9:18 PMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Roy,

Something is wrong with the properties somewhere. C/S (unless you have
the trial version) is not limited to 5 or 7 concurrent sessions. From
the manual under Appendix B (System Capabilities): "The maximum number
of concurrent sessions for an application or ElevateDB server is 4096".

You should not have an issue running F/S and C/S together in the same
app. WHile I haven't done so yet with EDB, I did it a lot with DBISAM,
running local tables for some static pick list tables and C/S for my
main data.

Jan
--

> ElevateDB Error #504 The maximum number of concurrent sessions (5)
> has been reached.
Fri, Sep 12 2014 4:49 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

J.B.

>Something is wrong with the properties somewhere. C/S (unless you have
>the trial version) is not limited to 5 or 7 concurrent sessions. From
>the manual under Appendix B (System Capabilities): "The maximum number
>of concurrent sessions for an application or ElevateDB server is 4096".

Since I've been using F/S only I've never bothered about buying the C/S version so yes I am using the "trial" version that's included with the standard VCL product which is limited to 5 connections.

>You should not have an issue running F/S and C/S together in the same
>app. WHile I haven't done so yet with EDB, I did it a lot with DBISAM,
>running local tables for some static pick list tables and C/S for my
>main data.

This is my belief, but its not what I'm seeing.

Roy Lambert
Fri, Sep 12 2014 5:44 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul

>Out of curiosity does you app use background threads that use EDB ?
>AFAIk each one of those requires a separate session and counts as
>separate connection.

Some, but as at this point in time they are all F/S

>BTW - I got lost with the steps above when you were opening and app and
>starting service after (does that mean your app was using F/S and then
>switched to C/S?!).

No the app was and is using f/s I was trying to open the database in EDBManager using c/s

>> If your theory is right then EDBServer is somehow keeping connections open after its been shut down (ok it is sort of possible since I didn't power the PC down).
>
>I believe this is only case if you don't cleanly disconnect. The other
>reason could be if your WiFi is not stable and has an outage so your app
>never closes its connections. Setting a fairly aggressive timeouts
>should help with that (i found this article useful myself :
>http://www.elevatesoft.com/articles?action=view&category=edb&article=connections_disconnections_reconnections)

The only problem with that is that so far everything is local to a PC - EDBserver, EDBManager, TfR and the database

>
>> I then noticed I had two copies of TfR open. Closed one and EDBServer would start. Opened a second instance of TfR and EDBService minimised itself and now refuses to talk to me at all. Opening EDBManager and trying to access the data via c/s I get
>> ---------------------------
>> ElevateDB Manager
>> ---------------------------
>> ElevateDB Error #1100 A connection to the server at '127.0.0.1' cannot be established ('Socket error: No connection could be made because the target machine actively refused it.
>> (10061), on API 'connect'')
>
>It sounds like EDB server has crashed. The error message generally
>indicates "nobody is listening" which would be consistent with the edb
>server not restoring from tray.

OK but what has made it crash? That's what I need to know.

>I'm little unclear on your F/S and C/S mix here but generally if you use
>edb server then only F/S i would even consider is local F/S only (app on
>same machine as edb server and db locally as well).

At the moment I'm just testing and as I said above everything is local to a PC. If and when I go C/S I'd almost certainly agree with you.

Roy Lambert
Fri, Sep 12 2014 6:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Barry

>So your TfR app connected using Local Connection???
>Because you say "Open TfR, Move around in there a bit (which opens tables) then load EDBServer, open it up and click start service" tells me you ran your TfR app and opened tables locally, then started the EDBServer. Because you can't open database tables via C/S mode when the EDBServer isn't running.

Exactly

>Are you running the EDBServer in the system tray or as a Service? You normally only have one EDBServer running at a time (unless you need 2 EDBServers running and I don't think you want that). You can't run 2 EDBServers if they are using the same port.

In the System Tray, and only one instance. I want to learn the basics before I get into anything as advanced as two servers running.

>When you run EDBServer as a service you won't have any GUI in the system tray and have no way of communicating with it except via EDBMgr. If on the other hand you have EDBServer running in the system tray then you must stop the EDBServer service, otherwise the two will try and use the same port.
>
>On my app's login screen I have an advanced tab where I give the user the choice of connecting to the C/S or as a local connection. Is that what you're doing?

That's sort of where I'll end up. Right now I just want to get things so that they will work and so TfR is still f/s only.

>>If your theory is right then EDBServer is somehow keeping connections open after its been shut down (ok it is sort of possible since I didn't power the PC down).<
>If your app closes normally, it should disconnect from the server. I suppose you could explicitly close the database, connection, and engine when your datamodule is destroyed. This will give you a chance to set up a breakpoint to step through it and observe in EDBMgr that the connection is closed immediately.
>
>
>>I then noticed I had two copies of TfR open. Closed one and EDBServer would start. Opened a second instance of TfR and EDBService minimised itself and now refuses to talk to me at all. <
>
>"EDBService minimised itself and now refuses to talk to me at all."
>Hmm. I've seen that happen when a bloke minimizes (or forgets) an anniversary. LOL

Really I usually find it enhances conversation - just not in a pleasant way Smiley

>I think when you said "Closed one and EDBServer would start" you meant the EDBServer then allowed connections. EDBServer should always be running in the Windows Services window. If you have the EDBServer Service stopping and starting on its own accord, then that is definitely not normal.

Precisely. I was using stop & start in relation to EDBSerever functioning as opposed to loading.

>
>>Opening EDBManager and trying to access the data via c/s I get
>
>>
>---------------------------
>ElevateDB Manager
>---------------------------
>ElevateDB Error #1100 A connection to the server at '127.0.0.1' cannot be established ('Socket error: No connection could be made because the target machine actively refused it.
>(10061), on API 'connect'')
><
>
>I would leave EDBMgr open all the time so you can check who is connecting.
>This problem might occur if you have the server configured to only allow encrypted connections and your client is not using encryption so the server refuses to allow the client to authenticate.

Before I can leave it open all the time I need to get it working properly all the time. It currently isn't playing nice Frown


>>I knew there was a good reason I stuck with f/s all these years Frown<
>It is time you ventured out of your F/S house and into the C/S world. It will definitely be worth the effort.

Not at this rate it isn't Smiley

Roy Lambert
Fri, Sep 12 2014 6:44 AMPermanent Link

Jan Ferguson

Data Software Solutions, Inc.

Team Elevate Team Elevate

Roy,

Sorry...We've both been working for so long with DBISAM and EDB that I
assumed you have the full C/S version.
--
Jan


Roy Lambert wrote:

> J.B.
>
> > Something is wrong with the properties somewhere. C/S (unless you
> > have the trial version) is not limited to 5 or 7 concurrent
> > sessions.
>
> Since I've been using F/S only I've never bothered about buying the
> C/S version so yes I am using the "trial" version that's included
> with the standard VCL product which is limited to 5 connections.
Page 1 of 2Next Page »
Jump to Page:  1 2
Image