1. Hannu Pikkarainen
  2. PowerServer
  3. Sunday, 19 November 2023 08:43 AM UTC

Hi,

We have created a small PB application and distributing it with PowerServer 2022R2, licenses for 150 users.

When user starts the application and Login screen is opened the database connection MS SQL 2019 is not working yet. It can take 1second - 4 minutes to build up.

What could cause this? Servers CPU usage less than 10%

Is there any way in application to find out if the database connection through PowerServer is ready to be used?

Is there a way in PowerServer I can use for controlling it's functionality and usage (user count now, max user count in history)?

BR, Hannu

 

Accepted Answer
Hannu Pikkarainen Accepted Answer Pending Moderation
  1. Tuesday, 5 December 2023 15:59 PM UTC
  2. PowerServer
  3. # Permalink

Hi,

My bad, my mistake. You were right, database connection is created promptly. Problem was my a bug in my code.

Case closed.

BR, Hannu

 

Comment
There are no comments made yet.
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 November 2023 09:15 AM UTC
  2. PowerServer
  3. # 1

Hi Hannu,

PowerServer provides some management APIs, among which GetSessionCount can get the number of sessions in the current server instance, but it cannot obtain the historical maximum value and needs to be implemented by the user. Regarding the use of GetSessionCount and other management APIs, you can refer to the following document links
https://docs.appeon.com/ps2022r3/Session_GetSessionCount.html
https://docs.appeon.com/ps2022r3/Use_PowerServer_Management_APIs.html

As for PowerServer performance issues, we recommend that you use a packet capture tool such as Fiddler to track and debug to see which step is slow in the application. Regarding the use of Fiddler tool, you can refer to the following document link
https://docs.appeon.com/ps2022r3/Debugging_with_Fiddler.html

Regarding the issue "But when installed to workstation, it doesn't work", we recommend that you submit it to our ticket system and provide us with a small test case that can reproduce the problem for us to further analyze the issue.

Regards,
David

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 19 November 2023 21:19 PM UTC
  2. PowerServer
  3. # 2

Hi Hannu;

 By chance are you ...

  • Using the "LongConnection=1" in your App's SQLCA DBParm?
  • Updating the login information in your DB without issuing a DBMS "commit" and thus is incurring a long DB lock?

Regards ... Chris 

Comment
There are no comments made yet.
Hannu Pikkarainen Accepted Answer Pending Moderation
  1. Sunday, 19 November 2023 20:38 PM UTC
  2. PowerServer
  3. # 3

Hi,

When the program starts and the login screen opens, username of the last user logged from that worksation is retrieved from the database. When I run it locally from the server, it works, even it has been deployed through PowerServer. But when installed to workstation, it doesn't work. Even if I close the program and restart it right away.

If I use the program, workstation and username is saved to database. If I then uninstall it and reinstall it, it starts the first time and program gets the username from database. But with the second start it does get it anymore.

Auto shut down is not used in SQL, server is running all the time.

BR, Hannu

 

 

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Sunday, 19 November 2023 16:07 PM UTC
  2. PowerServer
  3. # 4

i doubt it is the connection to the database that takes that long.  why did you say it was that?

 

It takes time to spin up the web api.  In IIS it has to start up processes, if you are using containers, it has to start up the container as well.  The first person who accesses it will have to wait a few extra seconds.  The processes will typically shut down automatically in 4-5 minutes if there is no activity and it can take that long to restart.  

 

If you are hosting your own SQL Server, you may have the database set to auto shut down when there is no activity too.  In that case you will have the time to start up the database added to the process start up time as well.

Comment
There are no comments made yet.
Hannu Pikkarainen Accepted Answer Pending Moderation
  1. Sunday, 19 November 2023 08:53 AM UTC
  2. PowerServer
  3. # 5

Hi,

I forgot to inform that both PowerServer and MS SQL server are both runing on the same Win2019 server in Azure.

BR, Hannu

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.