in reply to Re^2: Perl concurrent access
in thread Perl concurrent access
It would help a bit if you post the script you are using or at least an example of what it does as that makes things easier to understand for all of us.
The next thing you should keep in mind is that it always pays of to use finte resources for the shortest amount possibe. Meaning, close a DB connection as soon as you no longer have a need for it. This will be the same for any and all resources like files, printers and well pretty much anything that you can for what ever reason not share with a second instance of the script. So check for file locks or other possible reasons why your script would not want to run more then once.
Also if you expect to have say 100 users executing this script at roughly the same time or in a relatively short time frame. See if you can maybe change the logic making an caching option for the DB results as it could quite likely be that out of the 100 users some will end up running the same query. Depending on the speed with which the data in the DB is likely to change and the need to have up to date results you might be able to simply use cached results for a certain percentage lowering the load on the database and the risk of tying up your limited resources.