I have a timer job that runs every night at midnight.
The first part of the timer job is to iterate through every single site in a particular site collection (there are many).
The second part of the timer job is to issue e-mails for each list item that was retrieved in the first part.
Both potentially rather taxing operations.
On one particular environment, the timer job doesn't work (i.e. no e-mails are sent/received), but has been proven on 3 other environments and behaves as expected.
In the ULS logs for the environment with the problem, I can see a lot of the following sorts of entries for this timer job:
An SPRequest object was reclaimed by the garbage collector instead of being explicitly freed. To avoid wasting system resources, dispose of this object... Potentially excessive number of SPRequest objects (26) currently unreleased on thread 20. An SPRequest object was not disposed before the end of this thread....this object will now be disposed.
Would you expect that such errors could cause the timer job to stop or fail to execute the 2nd part?
There are no other relevant exceptions in the logs to note.
I am now going to spend time refactoring the code to ensure all objects are disposed of correctly with using statements and run spdisposechecker anyway, but can I confidently say that this may just solve the issue?
PLEASE NOTE The server on which this timer job does not perform has significantly less resources than the other environments. It's processor and RAM are max'd out before even running the timer job so I'd imagine it has no tolerance for memory leaks or poorly disposed objects.