Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange crash
#1
Hello,

i have build intraweb standalone apllication
i am on windows server 2019 datacenter,  with all patch for test
the server is not charged only one or 2 users.

the version is IW 15.2.10

once a day my software shutdown alone, with no reason !

my application is an stand alone .exe application,
start with admin right,
have all right in this directory
my server of test have 16GB memory , on ssd drive

Question,

What is best way for application

1 / standalone .exe
or
2/ service windows
or
3/ isapi solution

thank's for your help
best regards
Reply
#2
Hi,

I'm using the Windows Service option. Developed the application and tested it as a Stand Alone exe-file, and once it was ok, put in on a server (the SQL database server actually) and installed it as a Windows Service.

It's working perfectly.

At first I did have strange problems, but they were all resolved, once I made sure all variables was defined within the secure Form scope.

Regards
Soren
Reply
#3
"once a day my software shutdown alone, with no reason !"

Not true. 99.9% of such cases, its bugs in user code that crash the server. I suggest you enable exception logging and see what his happening.
Reply
#4
Yes may be,

but the problem, is i have enabled the exception error and nothing !

May be i do mistake !

what you mean by:

At first I did have strange problems, but they were all resolved, once I made sure all variables was defined within the secure Form scope.
Reply
#5
When running the program as a single user, there were no problems, but as soon as it is run by more users simultaneously, unsure variables are being changed by different users, so you cannot be sure the value just added to a variable, is the same when you use it again.

Ex. The result of a select call to the database, would end up being the result of another users select request.
Reply
#6
Ok,
so, the variable must be déclared where ?

in usersession or sever controleur ?
Reply
#7
All variables declared in UserSession are safe. I'm not sure you would declare any in ServerController.

The unsure ones I am referring to, are those used by the individual forms. For every form you usually have different variables you use in the form, and from traditional VCL forms, the values in such vars, are safe from other users, even for other copies of the same program running on the same machine.

But in IW, they are not. To be safe (threadsafe it is) they must be declared in the forms private or public section. outside the Form..end, all vars are not threadsafe, and that was the problem I had. Everything worked perfectly while running and testing the application on my own machine, but as soon as 2 or more users was using it, it mixed up values between users. And sometime the application crashed.

You can read more about it and other similar reasons for system crash, in the following topic: https://www.atozed.com/forums/thread-1522.html

Regards
Soren
Reply
#8
For your data "leak" between users this thread will help
https://www.atozed.com/forums/thread-1525.html
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)