Hi Monks, I run active perl in windows server 2008 r2 installed in a VM environment. I have a automated script which move a file from 1 location to another.
I have ws_ftp sever running on the server.I have a rule configured to move files to a different directory whenever there is a successful file drop.This is done by my perl script. Script is triggered for each file dropped on the server. When ever a large number of files are dropped in the server, the script does not work after few initial files. After some investigation we could find that perl.exe is getting locked with READ_ONLY. We had a case opened with microsoft for the same.The following are few highlights of the reply from microsoft:
"At this point I can tell you that there is a process/thread created for each of the files in the inbound folder. The ones that fail the process/thread terminates before doing the transfer. The transfer is not a copy operation, but a rename operation. The point where the termination occurs is after Perl loads the user32.dll and kernel32.dll. Here is the dilemma with this point of failure. Perl is choosing to terminate, finding out why is going to be difficult due to all the individual processes spinning up and this is inside of Perl and this process records nothing else between the time it loads these dlls and the time it starts termination process. I am going to check on how we might trace this, I have an idea but need to verify. This would be a point if there is any kind of Perl debugging that can be done would be good to look into it."
"I just spoke with Barry xxxx of Microsoft and he showed me that there are 436 processes running at the same time during one file transfer. He pointed out that for each process, there is a 2nd and 3rd process running simultaneously. For example, each svchost.exe., launches a conhost.exe. and a killhost.exe. 436 is the limit."
The summary of reply is that, Each instance of my perl script is creating 2 more sub processes.My question is Why my script is creating 2 more sub processes to simple "move" operation? Is there any way to avoid this so that memory consumption can be reduced? Is there any other reason for perl.exe getting locked?
In reply to number of processes created by perl script. by bsshetty17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |