Brad,

WOW!

This is EXACTLY my scenario as well! I added a stored procedure to check a folder for files.


Could you share your "web server has started" code?

Thanks

James.

On 3 Mar 2005, at 03:59, Brad Perkins wrote:



James,
Thanks for the confirmation. I've been pulling my hair out on this one all morning. Next step is to see if I can find downloadable archives of the betas so I can roll-back to a fresh copy.

We solved this. It was not corrupted plug-ins.

In our application the ITK web server and some other TCP/IP processes are launched during Startup, based on the user login. We've been doing it this way for a long time and the startup code, processes launched and methods called have remained fairly static with no major changes to any of the ITK shell code.

In our method we have a method that calls.

A4D_INIT
A4D_Debug_INIT

Both of these methods remain as provided in the ITK A4D Shell.

Later we call a method that starts a process that checks our queued email messages table and sends any waiting messages. Mail is sent using 4DIC. Unless we are doing development that would generate email reports the mail queue wouldn't contain any messages and no mail would be attempted to be sent.

We also start a process that checks a remote FTP server for a file that is used to occasionally update some information stored locally in our database. FTP uses 4DIC.

Another developer was helping me debug this and found that if he changed the "$A4D_Console" local process launched by A4D_Debug_Init to a global "A4D_Console" we could get the ITK web server to launch albeit still slowly. That seemed really strange since the code had always worked before. I did notice that when we made this change processes would launch in an order similar to this:

HTTP_Master
HTTP_Closer
HTTP_Slave <== This is where we'd usually hang
A4D_Console
HTTP_Slave
HTTP_Slave
HTTP_Slave
Mail_Check_Send
HTTP_Slave
...
HTTP_Slave
Remote_Import_Update

That is, some non-web server processes were launching in between HTTP_Slave creation. All of these other processes are launched after A4D_INIT is called. I believe I'd noticed similar launch order before, but again, it always worked in the past.

I decided that I'd try to restrict the other processes from being launched until after all of the web server processes were launched. It certainly couldn't hurt?

I added a test at the end of A4D_INIT that checks for the existence of all expected ITK web server processes. This test loops until all processes exist or the a timeout is reached. Therefore it prevents A4D_INIT from exiting until some criteria is established. Those other processes won't start until A4D_INIT exits. Our web client processes now launch in this order:

HTTP_Master
HTTP_Closer
HTTP_Slave
HTTP_Slave
HTTP_Slave
HTTP_Slave
HTTP_Slave
...
HTTP_Slave
$A4D_Console
Mail_Check_Send
Remote_Import_Update

I don't know why it worked for so long and just stopped, but it works fine now. Changing the $A4D_Console process from local to global has me scratching my head. Maybe the problem is due to contention between ITK and 4DIC (ITK runs asynchronous, 4DIC doesn't) but that seems highly unlikely too? I'm just glad it is fixed. I really thought we had an unusable structure.

If anyone wants the "web server has started" test code I'll gladly share it once I've got it tested and cleaned up.

I just wanted to share this experience in case anyone else hits this problem.

-- Brad Perkins _______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/





Drag And Drop Limited 41 Brook Road Rayleigh Essex SS6 7XJ http://www.drag-and-drop.com t: 01268 779648 f: 01268 741675

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to