IT Heroes Posted June 22, 2011 Posted June 22, 2011 Hi, Running filemaker server advanced 10 with latest scriptmaster version. It is using a plugin I have generated from scriptmaster advanced. Windows version. I believe I am having an issue when 2 scheduled tasks are running on the server at the same time that both use functionality from the scriptmaster plugin. Basically the server CPU usage maxes out and the server stops responding. I need to kill the task and restart the filemaker server. First of all I thought it was the function I wrote, but it runs fine from a filemaker client machine. And besides should it really be able to crash the server.? So then I thought maybe it is using too much heap space when multiple schedules are running at once and crashing it. But if I start the server and manually run the schedules at the same time it crashes instantly, and the process memory usage is actually very low. If I run each schedule separately at the same time they run fine. So I come to the conclusion that it cannot handle being run from 2 or more schedules at the same time. These tasks take a couple of minutes each, so that is why the schedules can sometimes overlap... Does this sound correct? I can simply make sure the scheduled tasks don't overlap, or run them in succession in a single task... but this should really be noted somewhere as a limitation... or better still make it run from multiple scheduled tasks at the same time .
Smef Posted June 22, 2011 Posted June 22, 2011 There isn't an inherent problem with running two tasks that use plugin functions (I think FMS queues up scripts and does just one at a time), but it's possible that you're hitting an issue. Can you please send me your crash and your plugin logs?
IT Heroes Posted June 23, 2011 Author Posted June 23, 2011 Hi, Sorry there doesn't appear to be any logs. The only thing to note is that the last log entry is the schedule starting (Then a couple of superfluous script errors for a few seconds, "Go to Record/Request/Page"), then nothing. The process doesn't actually "crash", but goes to maximum CPU usage and stops responding. The only way to stop it is to end task. Is the Scriptmaster log under C:\360Plugin Logs ? There isn't anything listed in there since January. I can try to set up a simple example and see if it crashes and is reproducible. I might do that on a different filemaker server... no-one seems to appreciate me crashing the production server Would this be helpful? FMS appears to run more than 1 script at a time. I've just left one script running all night and all the other scheduled tasks kept firing and running while that one was still executing. But only one of those tasks uses Scriptmaster, I've disabled all the other scriptmaster ones until I sort out the issue. Would it make a difference that the plugin functions I am using are using an underlying Jar file?
Smef Posted June 23, 2011 Posted June 23, 2011 FileMaker Client OS X /Users/userName/Library/Logs/360Plugin Logs/360Plugins_XXXXX.log Windows XP or S2003: C:\Documents and Settings\<userName>\My Documents\360Plugin Logs\360Plugins_XXXXX.log Vista, 7, or S2008: C:\Users\<userName>\Documents\360Plugin Logs\360Plugins_XXXXX.log It may also be possible that there is something with your code that is getting it stuck in a loop. If your two scripts are trying to read or write the same file at the same time one of them might be getting stuck. There are other ways they could be conflicting as well, so you'll have to look over your modules and look for potential issues like that.
IT Heroes Posted June 24, 2011 Author Posted June 24, 2011 Thanks, It helps when I look at the right log file . So the second scheduled task started at 18:50. The last log entry SyncFileOrFolder is from the first task that was running... which is where the log ends (Also where the fm server log ends) The 2 different tasks do completely different things in this case. 1 tasks is scanning the database and sending notification emails. The other task is checking folders on the filesystem are in sync. I get this one a lot! WARNING: pushContext called with function (com.prosc.beanshell.CompiledFunction@19836ed) when stack size is 1; this either means it was called re-entrantly, an idle handler was called without waiting for a return from a previous call, or pop was not called from last invocation. Current thread: Thread-194486 Last log entires CONFIG: executeSql: SELECT "Series Construction Type" FROM "PPA" WHERE "Job Number" = '0000749' 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge pushContext WARNING: pushContext called with function (com.prosc.beanshell.CompiledFunction@16bd8ea) when stack size is 1; this either means it was called re-entrantly, an idle handler was called without waiting for a return from a previous call, or pop was not called from last invocation. Current thread: Thread-194484 Previous calls: [com.prosc.beanshell.CompiledFunction@11bbe4f] 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge$3 run CONFIG: === Executing plugin function ArrayGet on thread Thread-194484 === 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge pushContext WARNING: pushContext called with function (com.prosc.beanshell.CompiledFunction@16bd8ea) when stack size is 1; this either means it was called re-entrantly, an idle handler was called without waiting for a return from a previous call, or pop was not called from last invocation. Current thread: Thread-194485 Previous calls: [com.prosc.beanshell.CompiledFunction@11bbe4f] 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge$3 run CONFIG: === Executing plugin function ArrayGet on thread Thread-194485 === 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge pushContext WARNING: pushContext called with function (com.prosc.beanshell.CompiledFunction@19836ed) when stack size is 1; this either means it was called re-entrantly, an idle handler was called without waiting for a return from a previous call, or pop was not called from last invocation. Current thread: Thread-194486 Previous calls: [com.prosc.beanshell.CompiledFunction@11bbe4f] 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge doFunction WARNING: Function result was null in main thread Thread-194376 for com.prosc.beanshell.CompiledFunction@11bbe4f; replacing with empty string 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge$3 run CONFIG: === Executing plugin function ArraySql on thread Thread-194486 === 22/06/2011 18:50:07 com.prosc.fmkit.PluginContext executeSql CONFIG: executeSql: SELECT "Start Job Tracking Category", "Estimated Weeks", "End Job Tracking Category" FROM "TimelineHouseTypeCategory" WHERE "House Type" = 'Intempo Series 2 Storey' AND "Category Name" = '2nd Plate Height Issued' 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge pushContext WARNING: pushContext called with function (com.prosc.beanshell.CompiledFunction@11bbe4f) when stack size is 1; this either means it was called re-entrantly, an idle handler was called without waiting for a return from a previous call, or pop was not called from last invocation. Current thread: Thread-194487 Previous calls: [com.prosc.beanshell.CompiledFunction@11bbe4f] 22/06/2011 18:50:07 com.prosc.fmkit.PluginBridge$3 run CONFIG: === Executing plugin function SyncFileOrFolder on thread Thread-194487 ===
Smef Posted June 24, 2011 Posted June 24, 2011 What version of scriptmaster are you currently using on your server?
IT Heroes Posted June 25, 2011 Author Posted June 25, 2011 I updated to the latest version a few days ago to see if that fixed the issue (and also updated the JRE version). So that log should have been from the latest version. The previous version I was using was 4_02. Updating the version didn't seem to make any difference. Thanks.
Smef Posted June 27, 2011 Posted June 27, 2011 Can you please email me your full log files after the next time you get this error? OS X /Library/FileMaker Server/Logs/360Plugin Logs/360Plugins_XXXXX.log Windows XP or S2003: C:\Documents and Settings\Default User\My Documents\360Plugin Logs\360Plugins_XXXXX.log Vista, 7, or S2008: C:\Users\Default User\Documents\360Plugin Logs\360Plugins_XXXXX.log
IT Heroes Posted July 1, 2011 Author Posted July 1, 2011 It's been running all week without fault since I've changed the scheduled tasks to not overlap. I'll manually run a scheduled task after hours and get it to crash then send the log. I might reset the log first as it will be a hundred MB by then.
IT Heroes Posted July 3, 2011 Author Posted July 3, 2011 I have emailed some log files to you. Thanks.
Smef Posted August 11, 2011 Posted August 11, 2011 I don't have a solution for you at this time, but it's something we're looking into.
Recommended Posts
This topic is 4921 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now