6 Replies Latest reply on Jan 9, 2014 12:27 PM by MattLeach

    Server Side Scripts Locking up


      I've had this issue happen a few times so i'm wondering if there is a cause.


      I have 3 schedules that run on an hourly basis to perform a multitude of tasks. 2 of them are FileMaker Scripts, 1 is a Script Sequence.


      Randomly, these scripts "lock up". What i mean by that is the go into a Running state and just hang there. My only recourse is log everyout out of the databases and restart the FileMaker Server. I have attempted to delete and re-create the schedules when they lock up but it does not correct it.


      I've serached the Log Viewer and show nothing out of the ordinary, no errors.


      What's odd is that i have 8 other schedules setup (all backups) on a bi-hourly basis and these schedules never lock up.


      My setup is FileMaker Server 12 Advanced running on Windows Server 2008 Standard 32-bit.


      I will be upgrading the server to Server 2008 64bit and to FileMaker Server 13 within the next month or so with the hopes it will resolve it but in the mean time is there anything that i can do to prevent this?


      Thank You

        • 1. Re: Server Side Scripts Locking up

          Is this a new behavior? IE were they working before and now they hang? Or has the problem plagued you for the FM12's servers entire existence?


          If these scripts perform a "multitude of tasks" on live data as people are connected, there's always the chance that there's record locking issues, or other looping issues that are getting hung up. backup schedules are entirely different, and don't affect your scheduled scripts.


          Sometimes, rolling your own robust inside-filemaker logging as part of your scripts is the only way to track down hangups on FMS scripts. Some solutions, like audit logging and commit triggers, might be able to assist in some way.


          I've never experienced that issue without it being my fault in a script somewhere.


          Unfortunately, the usual thing to do for absolute inexplicable behavior of FMS is to wipe OS/reinstall or uninstall/reinstall. If that is the case, maybe you can manage until FM13 and it won't be an issue.

          • 2. Re: Server Side Scripts Locking up

            It has happened randomly since these scripts were implemented. Sometimes i can go months without an issue, sometimes it'll happen twice in same month. It's not often enough to cause an issue (maybe 5 times in a year) but i was just curious if anyone else had experienced it.


            2 of the scripts loop through records that are flagged to be emailed.


            The script sequence does an hourly export of records, followed by a system level script to upload to a SQL database and FTP server.

            • 3. Re: Server Side Scripts Locking up

              The send email is suspect to me. Are you using a plug-in or the native send mail?


              One thing to consider would be to have a context-free subscript that writes to a log table. IE:


              perform script "log subscript" script parameter "whatever you want here" - placed after whatever script step you are testing


              subscript would be:

              go to layout – log

              new record

              set field – notes – get(scriptparameter)

              go to layout – original layout


              You could run that subscript with negligible overhead and put in a script parameter of "sent email successfully" after the send mail step in your loop.


              Then you could modify this to serve other areas of a test as well. It sounds like your scripts run often enough that this type of testing would be easy for you.

              • 4. Re: Server Side Scripts Locking up

                So you have the schedules set to "force abort" after the pre-configured duration?


                Check the FMS logs for any errors.  Validation errors in particular can make server-side schedules "hang".

                • 5. Re: Server Side Scripts Locking up

                  I am using the native send mail.


                  I have some minor logging in place now to stamp a field as "sent" if there are no errors with sending the message but i could expand on that a little further to see if there are other issues.


                  Thank you for the guidance.

                  • 6. Re: Server Side Scripts Locking up

                    The scehdules are not set to force abort.


                    The only errors in the FMS log that pertain to any of the scripts are 401 errors for records not found which shouldnt cause them to hang, but nothing else.