Welcome! Log In Create A New Profile

Advanced

Webserver number of users

Posted by ArieM 
Webserver number of users
April 23, 2021 12:09PM
Hi all,

I have an fieldservice app running, communicating with a AWP page to sync data. Every connection starts a wdsession process on the webserver. It's a dedicated webserver. The data itself comes from a MSSQL server, locatd on aother machine.

Every now and then we face a 100% CPU usage on the webserver. I see about 15 concurrent users all eating between 1-10%% CPU. The rest is in use by de OS (Windows).

As I am not an expert on this, so what can I do about this, so
- is an AWP page CPU consuming?
- would a change to a REST webservice make any difference
- do we just need more CPU's?
- how are webservers sized when hundreds of users are connecting?

The server now has 2 Intel Xeon 8171M CPU's on 2.6GHz

Any input would be welcome.

Arie
Argus
Re: Webserver number of users
April 23, 2021 02:10PM
- is an AWP page CPU consuming?

No... I'm using Fabrice's WXReplication a LOT, and it is working with an awp page too... No problem like that EVER.

- would a change to a REST webservice make any difference

No... It's the same thing, just packaged by PCSoft after years of hearing its user doing rest webservices with a simple awp page

- do we just need more CPU's?

No, you first need to figure out what the problem is...

- how are webservers sized when hundreds of users are connecting?

By reacting when there is a problem, most of the time.



So, no, the problem is NOT awp/rest... it COULD be the webdev engine, as this kind of problem has been reported before. From the top of my head, the solution was to deactivate some options (statistics, optimisation, or something of the sort). There is a post on the support blog about it, with all the details.

If that doesn't solve it, then you should add logs in your awp page code, so that you can see exactly what they are doing when the problem occurs (having problem connecting to the mssql DB, maybe, with a time out problem... Or a specific case in your queries that is extremely slow, or a maintenance being done on the sql server slowing everything down or...)
Re: Webserver number of users
April 23, 2021 04:11PM
Hi Arie,

I do this for years with WX22 in pure AWP (without automatic context) with hundreds of users.

The pages have only 2 sections:

Global Declarations:
gbufBin is Buffer=PageParameter(paramBuffer)
gbbufbin=MyProcedure(gbufBin)

Initialisation of Page:
StringDisplay(gbufBin,"text/plain")
EndProgram

Thats all. All in done in "MyProcedure".
The AWPSessions are created and after a second closed. No problems with CPU or Memory leaks so far.

regards Michael
Re: Webserver number of users
April 23, 2021 08:00PM
Hi Michael,

pretty much the same here with one exception.

I start a scheduled task for MyProcedure() which does the actual work. It takes a bit of time and in the meantime the client is asking for a progress state every now and then. Which is then shown to the user.

MyProcedure() gets data from a MSSQLserver and creates a SQLITE database.
In the end the device is getting this file to get it's new data.

Arie
Re: Webserver number of users
April 23, 2021 08:18PM
Hi Argus,

I don't use replication because the database structure on the device is not the same as the server. The client has it's own datamodel.
For example it needs a totals overview of thousands of records which is too slow on the device, but only takes a few seconds on the server.
I also found that updating/adding/deleting a significant number of records is slow on the device, again the server does this much faster.

Arie
Re: Webserver number of users
April 23, 2021 08:19PM
Michael,

I know we have different situations but can you still give me an idea of the cpu's and memory in your server.

Arie
Re: Webserver number of users
April 23, 2021 10:06PM
Hi Arie,

have you ever thought that your server might be attacked?
Have you checked the Server Logfile?

Regards

Stefan
Re: Webserver number of users
April 23, 2021 10:36PM
Arie,

its a Hyper-V VM, 8 GB Ram, 2 Cores. Windows 2012 R2, in a cluster of 3 Hosts

regards

regards Michael



Edited 1 time(s). Last edit at 04/23/2021 10:39PM by Michael Drechsel.
Re: Webserver number of users
April 25, 2021 11:18AM
Hi Stefan,

that is not in my hands but according to IT that is not the case. They do active monitoring for these (and other) kinds of issues.

Arie
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: