06-04-2019, 03:00 AM
(06-04-2019, 01:48 AM)Alexandre Machado Wrote:Hi,(06-03-2019, 12:29 PM)ib elfving Wrote: I am not using any global IW-variables. My database (except for the firedac database connection) is accessed through variables in the usersession, so this should isolate the individual session data from each other, but I am using an ordinary delphi-unit for business routines. I will check this for variables that might cause the conflict, maybe try to move the database connection to the usersession instead to see if this makes a change.
Still - is it possible in an easy way to delay each call to the handler - e.g. 10 request arrives to the SA within 1 sec, but is "delay" so that each request starts with a delay of for instance 1 sec. (request 1 start at 1 sec, request 2 starts at 2 sec .. request 10 start at 10 sec)
You can serialize them using a critical section or a semaphore, but I find it weird that you want (or need) to do so. As long as you are not sharing things between threads you should be able to run "N" content handlers in parallel with no issues.
Just to answer some of the above questions.
The iw is an ultimate version.
The reason for asking for an easy delay method is that the application is in production, and i have daily complaints from the staff concerning this issue. My thoughts was to implement a fast, but wrong, solution in order to decrease this, in order to give me some time and peace to inspect and re-implement my business logic unit, as I am sure that the problem is in my use of the database units. I have been checking the database documentation, and I can see several possibilities that I need to check (fdmanager, pooled connections etc.) - This is not an "over night" task for me, as the application is rather complex (6 years old).
Regards Ib