Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

CFImage, writeToBrowser, temp directory - max size?

$
0
0

We have what I think is a neat problem.

 

Our system handles admissions for students who apply to a school network. We get about 13,000 applications and we then print files for everyone 'likely' to get a seat, which is usually about 3-4,000 since it includes waitlists. Each file has about 17 QR codes, so even if you're only printing 500 files, that's 8,500 QR codes.

 

The files that are printed consist entirely of QR codes generated by a tomcat servlet that runs alongside Coldfusion. Because of our firewall, CF can access the tomcat servlet, but nobody else can.

 

This only has to be done once a year by one person and it doesn't have to be fast. The way we wrote it was to have the CF page use a <cfimage> tag with action 'read' to hit the servlet, then writeToBrowser.

 

If we just used regular <img> tags, we'd have to deactivate the firewall rule, and we'd be flooding the servlet with 8500 requests over 3 seconds (triggering some built-in defense against DDOS in Tomcat since it starts rejecting them pretty quickly - I'm not a Tomcat guru) as opposed to the 20-30 seconds it takes Coldfusion to process everything.

 

CF reads the image and saves it to a file with a name like _cfimg-85120841208412041241.png.

 

This works fine for the first 320 or so applications. After that point, when CF goes to fetch the temporary file, the GET request fails - no file.

 

In trying to locate the bottleneck here, I am curious as to whether there is a limitation on the size of files in the temporary directory or the number of files. The file size isn't a huge problem - the QR codes are teeny tiny PNGs. But it is a tremendous quantity of them.

 

I don't think the servlet is choking, but I could be wrong (anybody know where to look in Tomcat7 for a security parameter dealing with simultaneous requests?)


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>