Run Long Running Operation Job from another Long Running Job
-
2012年7月30日 上午 09:03
Hi,
I have created two long running operation jobs and trying to call one job from onther job. Mostly both jobs are running successfully but some times the innermost job is getting failed.
After viewing the status of that job in "Long Running Operation Status" list on the site, I found the following error:
<error><message>The handle is invalid</message><full>System.ComponentModel.Win32Exception: The handle is invalid
at Microsoft.Office.Server.Security.SecurityContext.Impersonate(IntPtr userToken)
at Microsoft.Office.Server.Security.SecurityContext.Impersonate(IntPtr userToken, Boolean duplicateToken)
at Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob.<>c__DisplayClass15.<ThreadEntryPoint>b__e()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)</full><customData></customData></error>Anybody can help me to resolve this issue?
Thanks,
所有回覆
-
2012年7月31日 上午 01:48版主
Hi RonakJ,
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue.Thanks,
Lhan Han -
2012年8月4日 上午 04:55
Hello RonakJ,
Thank you for your post .Just by looking at this callstack we can’t tell exactly what is happening. We need more details about those 2 custom created running jobs and what it does.
You need to look at the application event log, which will have the same callstack and check if there is any other related errors before or after this callstack. Check Sharepoint ULS log as well and filtered by correlation id for this callstack. It is also good to relook the code and double check whether it has been written in recommended way.
If there is not much information from looking at the details mentioned above then you may need to configure DebugDiag to capture memory dump at the time of exception occurrence and analyze them. Below are the steps
1. Start DebugDiag
2. On the Rules tab, click Add Rule.
3. Choose Crash | Next
4. A specific process | Next
5. Select OWSTIMER.EXE | Next (do not select the “This process instance only” box)
6. On Advanced Settings, click the “Breakpoints”| Add Breakpoint.
7. For the Breakpoint Expression, enter “System.ComponentModel.Win32Exception”without quotes, check the check box for “This is managed (.Net) breakpoint”.
8. Action Type = Full Userdump, Action Limit = 5.
8. Click Ok -> Save & close| Next
9. Give the rule a name and choose where you want the dumps to go | Next.
10. Activate the rule now | Finish.
Once you have captured the right memory dump, analyzing this dump would be helpful to find what is happening with the custom created timer jobs and why it is failing with the “The handle is invalid” error. For dump analysis if you need Microsoft assistance then you have to open a support ticket. Please visit the below link to see the various paid support options that are available to better meet your needs: http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone. If you are a MSDN / TechNet subscriber, you can also contact our support by
using your free support incidents.However, other members of the community may still have encountered the issue you're seeing, and have a solution to offer!
Thanks..
Regards,
Manas Biswas
Microsoft Online Community Support
Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.- 已標示為解答 Lhan HanModerator 2012年8月6日 上午 08:26

