I've a python based SSRS report generation utility that I'm using to generate multiple reports (often 100+). The way it's setup is -
- Multiple threads are invoked using threading.Thread and each of them is given a dictionary.
- Each thread parses the dictionary and calls rs.exe passing in relevant arguments via python's subprocess.call
Reports get generated with the following caveats -
- If there are around 20-30 reports everything works fine without much issues.
- If the number of reports go beyond 40-50+ (for reasons unknown to me so far), some of the reports don't get rendered and come back with error as obtained by subprocess.call non-zero status (Error message from subprocess.call does not point to any real error). But there is no error in those rs.exe commands, as they get rendered when i run them from windows command prompt.
- Additionally when i try to re-run all those failed reports they get rendered. There's no change in the commands or data while they're being re-run.
To work around this, I employed a retry logic for 2 iterations which seems to fix the issue at times. However when the reports go beyond 100/150+ even the retry doesn't work. Now i could extend the retry logic to keep retrying until all the reports are rendered and whatever failures happen are genuine ones (like RDL not found, corrupted and so on). But before i do any such thing, want to know if there's any limitation on how many rs.exe can be launched simultaneously or if there's any limitation on python's subproces.call when invoked in a multi-threaded context.
Can someone please share their expertise if they've faced this kind of issue and resolved it?
Thanks.