Terminal Services - 1 User Fast, 2+Users Slow (OpenInsight 32-Bit)
At 03 MAR 2006 12:39:06AM Harley Teague wrote:
Client is running Windows Server 2003, OI 4.1.3 app (9 User runtime, no Universal Driver). One user on any device running a terminal services session, OI starts up and attaches data volumes in under 2 seconds. If a second (or subsequent) terminals session is started, OI starts up and attaches volumes in around 30 seconds.
Any suggestions?
At 03 MAR 2006 02:40AM [email protected]'s Don Bakke wrote:
Harley,
no Universal Driver
Are you using any kind of network product?
At 03 MAR 2006 03:47AM Colin Rule wrote:
You need to set the application environment variables in SYSENV to change the Station ID, field position 32 contains the program to run, to ensure that each user is considered as a unique station id.
This is a known issue and causes just the speed issue you state.
I have added a small stored procedure to append the time to the users station id to make it unique.
FUNCTION Set_Station (Flag, Station)
* Sets the Station ID
* Required for Terminal Server
*
Station=FIELD(STATION,"-",1):"-":TIME()RETURNEND
You also need to add a small change to some settings in your app to tell the app which program to run when it starts.
This would be in some application setting area of your app and needs to be run just once.
This would be like this, substituting 'myapp' with your application name.
OPEN "SYSENV" TO SYSENV THEN
IF UsingTermServices THENWRITEV "SET_STATION*myapp" ON SYSENV,"ENV_myapp",32 ELSE NULLEND ELSEWRITEV "" ON SYSENV,"ENV_myapp",32 ELSE NULLENDEND
At 04 MAR 2006 07:43PM Harley Teague wrote:
Thanks Don, the OI runtime was set to the Universal Driver (it must have been set automatically when "bumping" the user count)- so I set it to the All Networks Driver.
At 04 MAR 2006 07:48PM Harley Teague wrote:
Brilliant - Thank-you Colin for explaining it so well (did notice an earlier posting you provided but I did not fully appreciate the SYSENV field 32 function) - Have done as you suggested and the client is over the moon.
At 04 MAR 2006 08:41PM [email protected]'s Don Bakke wrote:
Harley,
The point I was trying to make is that it appears you aren't running a server based network product. Since you have 9 users and the terminal server seems to be your application server, I would highly recommend that you install one. Currently you are using the client drivers which means you are running in peer-to-peer mode.
Obviously Colin's suggestion was the one that fixed your speed problems. I sometimes forget about the station ID issue since we automatically ship this logic with all of our applications (whether or not they are running on a terminal server) and it has recently been made moot in OI 7.2.1.
At 05 MAR 2006 03:49PM Barry Stevens wrote:
….and it has recently been made moot in OI 7.2.1
Can you explain this!
At 05 MAR 2006 04:58PM [email protected]'s Frank Tomeo wrote:
Barry,
In previous versions, the SYSLOGINS table had a three part key:
Database ID * User Name * Station
In the 7.2.1, a fourth part has been added. It is now:
Database ID * User Name * Station * Process_ID
With that update, it is unnecesary to modify the key anymore to account for multile users logging in with the same DbId*Name*Station combination, since the process ID will make the key unique.
At 05 MAR 2006 05:26PM [email protected]'s Don Bakke wrote:
Barry,
To add on to what my colleague has said, as of 7.20, OpenInsight now automatically updates the SYSLOGINS table when the engine is launched. Prior to 7.20, it was the responsibility of the developer to make this happen. Usually, this was done during the application initialization routine (e.g. Set_Station_ID) or sometime during the CREATE event of the application entry point.
Unfortunately, it was forgotten that multiple connections from the same machine produces the same key for SYSLOGINS…unless something is done to change the key (which is what Set_Station_ID does). Therefore, a delay in the second connection was experienced while the system waited for the lock on SYSLOGINS to time out.
Since 7.20 (and higher) uses OEngine to update SYSLOGINS (which is necessary so all connections, such as OECGI, get to use this table), it does not call Set_Station_ID. This was quickly resolved in 7.21 by adding a fourth part to the key, Process ID, which will always be unique.
At 05 MAR 2006 08:59PM Barry Stevens wrote:
Ah, great thanks…will file that away for future reference.