We completed our upgrade to 2004 in an effort to get rid of our random web server hangs. We were kind of surprised that everything went fairly smoothly. Only found one problem in the compiled structure that needed an update last night - that's where we ran into our next problem.

In trying to track down the cause of the hang, Aparajita had asked for the output of several performance tools. One was Activity Monitor, and to capture "Sample Data" for the 4D Client during a hang. It never pointed to anything, but it was curious that one area of the output (which I only have a gut feeling on how to interpret) seemed like there was a semaphore constantly running; you see something like this towards the end of the "Sample Data":

    295 Thread_1003
      295 _pthread_body
        295 __ape_agent
          295 mach_msg
            295 mach_msg_trap
              295 mach_msg_trap
    295 Thread_1103
      295 _pthread_body
        295 CarbonSelectThreadFunc
          295 BSD_waitevent
            295 syscall
              295 syscall
    295 Thread_1203
      295 _pthread_body
        295 CarbonOperationThreadFunc
          295 pthread_cond_wait
            295 semaphore_wait_signal_trap
              295 semaphore_wait_signal_trap

After upgrading to 2004, these items did not appear - until last night.

When I checked this morning to see if there were any hangs, I was greeted with a 4D web server 1-hour evaluation timeout page. When I looked at the sample data, the 1003, 1103 and 1203 threads (shown above) were back. It was puzzling why I would get an evaluation timeout after it had been running for 36 hours, until I realized that the server structure had been upgraded. The next thing we realized is that 2004 handles client web server licenses differently. Under 2003, you put the license on the client (I think by IP); in 2004, it gives the license to the first client that runs a web server. Somehow we had checked to start the web server by default on all clients. Our startup script would always stop the web server on any client not designated as a web server - but that was too late, it already given out the license. When the real web server client connected, it got an evaluation license and is most likely the cause of the 1003-1203 threads. Restarting the 4D Sever and the web client as the first client, the threads don't show up.

We think we turned on "Publish Database on Startup" (start web server) during an experiment to get https working. Seems that port 443 would only start using this method, not with the "Start Web Server" command.

The point of all this is that it is a little more complicated to get the web server running on a client. I don't know if these 1003-1203 threads have anything to do with our hangs in 2003, but they are certainly suspect if they are there. Some plugin or 4D is using them for something. We have to tweak our startup preferences and methods. Under 2004, starting any client with our transitioned startup procedure also created a webDecoy and Active4D logs folder, even though A4D_Startup was not called. Under 2003, these folders were not created, but the 1003-1203 threads showed up under all clients.

The above is just to add to the info database that this list gives us.

Steve Alex
AIDT

P.S.:
One of our justifications for upgrading to 2004 was to get https running on a high port number (to avoid running Mac OS X as root). Has anyone succeeded in doing this? We currently use port 8010 for Active4D and have ipfw forwarding any traffic to port 80 to 8010. We assume we can do the same by setting, let's say 8100, to be secure. I also assume that if this works, I'll have to change the reference to port 443 in "On Web Connection" to whatever I set for the secure port.






_______________________________________________
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