Bug #78
Tasks are started too early at application start
Status: | Resolved | Start date: | 11/02/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Pierre Marc | % Done: | 100% | |
Category: | Application Platform | Estimated time: | 8.00 hours | |
Target version: | 4.7.006 | |||
Operating System: | Any | Tested: | Yes | |
Version: | 4.7.005 |
Description
It seems that the tasks are started too early on application start, except at server startup.
Configuration¶
I have setup the following on my TEST application to get the trace :
- In init.nvp, add command 'NV_CMD=|MISC:SLEEP| TIME=|20000|' to have a init.nvp that lasts 20 seconds.
- Add a task (perl:Test/test_20121102[PROC='task']), repeating every 30 seconds : ie daily, during 23:59:59, repeat mode to YES, every 30 seconds, occurences to 0
- Add a listener (perl:Test/test_20121102[PROC='listener']), repeating every 30 seconds (30000 milliseconds).
Procedure perl:Test/test_20121102 only contains the command 'NV_CMD=|MISC:SLEEP| TIME=|5000|' to sleep 5 seconds.
Result at server startup¶
Here is an extract of the server startup trace :
Starting applications... 13:59:42 8A18BA4ED1 NVDEF --- Start procedure: init 13:59:42 8A18BA4ED1 NVDEF --- End procedure: init (0.00 s) 13:59:42 2A66C3EDC8 TEST --- Start procedure: init 14:00:02 2A66C3EDC8 TEST SYSTEM:MISC:SLEEP (20.00 s) 14:00:02 2A66C3EDC8 TEST --- End procedure: init (20.00 s) Starting HTTP server on port 1081 ... Starting HTTPS server on port 1082 ... Starting scheduler... Starting listeners... NIRVA server ready 14:00:02 7EDC32DB29 TEST --- Start procedure: perl:Test/test_20121102[PROC='listener'] 14:00:02 B13A063145 TEST --- Start procedure: perl:Test/test_20121102[PROC='task'] 14:00:07 7EDC32DB29 TEST SYSTEM:MISC:SLEEP (5.00 s) 14:00:07 7EDC32DB29 TEST --- End procedure: perl:Test/test_20121102[PROC='listener'] (5.00 s) 14:00:07 7EDC32DB29 TEST SYSTEM:MISC:NOP (0.00 s) 14:00:07 B13A063145 TEST SYSTEM:MISC:SLEEP (5.00 s) 14:00:07 B13A063145 TEST --- End procedure: perl:Test/test_20121102[PROC='task'] (5.00 s) 14:00:07 B13A063145 TEST SYSTEM:MISC:NOP (0.00 s)
Everything is alright, listener and task are started after the server startup.
Result when server up, at application start¶
We stop the application in the nirva configuration tool, and then restart it (after a while to be sure tasks and listeners will be triggered as soon as possible).
Here is an extract of the trace :
14:00:25 342330E908 NVDEF SYSTEM:APPLICATION:STOP (1.12 s) 14:04:09 8A4672AA2B TEST --- Start procedure: init 14:04:10 C21B2A5258 TEST --- Start procedure: perl:Test/test_20121102[PROC='task'] 14:04:15 C21B2A5258 TEST SYSTEM:MISC:SLEEP (5.00 s) 14:04:15 C21B2A5258 TEST --- End procedure: perl:Test/test_20121102[PROC='task'] (5.00 s) 14:04:15 C21B2A5258 TEST SYSTEM:MISC:NOP (0.00 s) 14:04:29 8A4672AA2B TEST SYSTEM:MISC:SLEEP (20.00 s) 14:04:29 8A4672AA2B TEST --- End procedure: init (20.00 s) 14:04:29 342330E908 NVDEF --- Start procedure: (Config/system_application_list) 14:04:29 342330E908 NVDEF SYSTEM:CONTAINER:REMOVE (0.00 s) 14:04:29 F1B5DA1F6B TEST --- Start procedure: perl:Test/test_20121102[PROC='listener'] 14:04:29 342330E908 NVDEF SYSTEM:APPLICATION:INFO (0.01 s) 14:04:29 342330E908 NVDEF SYSTEM:OBJECT:TABLE_SORT (0.00 s) 14:04:29 342330E908 NVDEF --- End procedure: (Config/system_application_list) (0.00 s) 14:04:29 342330E908 NVDEF SYSTEM:APPLICATION:START (20.04 s) 14:04:34 F1B5DA1F6B TEST SYSTEM:MISC:SLEEP (5.00 s) 14:04:34 F1B5DA1F6B TEST --- End procedure: perl:Test/test_20121102[PROC='listener'] (5.00 s) 14:04:34 F1B5DA1F6B TEST SYSTEM:MISC:NOP (0.00 s)
The listener is correctly started after the end of init procedure, but the task is started right after init procedure started.
History
#1 Updated by Lionel Martin about 12 years ago
- Description updated (diff)
Corrected the formatting problem
#2 Updated by Pierre Marc about 12 years ago
- Assignee set to Pierre Marc
#3 Updated by Pierre Marc almost 12 years ago
- Status changed from New to In Progress
- Estimated time set to 8.00
- Tested changed from No to Yes
This will be corrected in Nirva 4.7.006
#4 Updated by Pierre Marc almost 12 years ago
- Status changed from In Progress to Resolved
- Target version set to 4.7.006
- % Done changed from 0 to 100