Bill,
I see over here (latest release)
https://metacpan.org/source/JJNAPIORK/Catalyst-Runtime-5.90049_005/lib/Catalyst/Request.pm#L260
am calling ->cleanup(1) when we create the HTTP::Body. is that not enough to
cleanup tmp files ?
regarding the tmp file thing, wow I have no idea, but I hope you find out and
report it to us!
Johnn
On Friday, October 25, 2013 8:53 AM, Bill Moseley <[email protected]> wrote:
I have an API where requests can include JSON. HTTP::Body saves those off to
temp files.
Yesterday got a very large number of errors:
[ERROR] "Caught exception in engine "Error in tempfile() using /tmp/XXXXXXXXXX:
Have exceeded the maximum number of attempts (1000) to open temp file/dir
The File::Temp docs say:
If you are forking many processes in parallel that are all creating
>temporary files, you may need to reset the random number seed using
>srand(EXPR) in each child else all the children will attempt to walk
>through the same set of random file names and may well cause
>themselves to give up if they exceed the number of retry attempts.
We are running under mod_perl. Could it be as simple as the procs all were in
sync? I'm just surprised this has not happened before. Is there another
explanation?
Where would you suggest to call srand()?
Another problem, and one I've commented on before, is that HTTP::Body doesn't
use File::Temp's unlink feature and depends on Catalyst cleaning up. This
results in orphaned files left on temp disk.
--
Bill Moseley
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/