shell script hangs while calling sql file

I have a master shell script which calls some 40 shell scripts. All the shell scripts calls a sql file which executes some sql statements.
I run these scripts in parallel such that it saves me time. When i executed them i saw some strange behavior.
Firstly, I found that some scripts among the 40 ran successfully whereas few scripts where hanging. I was able to see their process but not their corresponding sql process. If they had invoked the sql file and then hanging their sql process should be visible as well. But it's not the case here.

Secondly, i found that even the scripts that were called after the hanging scripts were completed. It means out of these 40 scripts, some intermediate ones was hanging for no reason.
I don't see any logs with exceptions nor errors.
I have tested these scripts individually and all these work perfectly.

Please help me to crack this problem.

I believe all these scripts are executing in Background. Only suggestion might be an echo statement before/after running each script together with the process id to debug , and also a sleep(1) or sleep(2) between invocation of each script.