Crash / Hang

22 views
Skip to first unread message

Dale Fraser

unread,
Dec 7, 2011, 6:33:09 AM12/7/11
to ra...@googlegroups.com

So I'm writing some code just proof of concept at this stage.

 

It traverses directories and renames images and puts them in relative folders based on the picture taken date if available or the file date if not.

 

It was running fine, but sometimes it gets a timeout 50 seconds message.

 

After that, it just doesn't work at all. I can run the page and it just sits there forever doing nothing.

 

Im not even sure where to look log file wise with railo, but no error or anything just sitting there forever. I feel one of the images has crashed the server or something, but who knows. Other pages in the webapp still run.

 

Hard to debug with no error, any help appreciated.

 

Regards

Dale Fraser

 

http://dale.fraser.id.au

http://cfmldocs.com

http://learncf.com

http://flexcf.com

 

Ron Stewart

unread,
Dec 7, 2011, 7:03:39 AM12/7/11
to ra...@googlegroups.com
If I were in your shoes, I'd start by turning on debugging in the CFML server (if it isn't already on) and adding cftrace calls at key points within the logic, and then turn it loose on a very simple/small portion of the directory structure to see if that sheds any light on where things are going astray.

-- 
/ron

Todd Rafferty

unread,
Dec 7, 2011, 7:08:44 AM12/7/11
to ra...@googlegroups.com
How are you doing the directory recursion? You do realize cfdirectory can do recursive automatically, right? There's an attribute for that.


On Wed, Dec 7, 2011 at 7:03 AM, Ron Stewart <ron.s...@gmail.com> wrote:
If I were in your shoes, I'd start by turning on debugging in the CFML server (if it isn't already on) and adding cftrace calls at key points within the logic, and then turn it loose on a very simple/small portion of the directory structure to see if that sheds any light on where things are going astray.


--
~Todd Rafferty
Volunteer
Community Manager
Railo Server - Open Source
----

Dale Fraser

unread,
Dec 7, 2011, 7:21:26 AM12/7/11
to ra...@googlegroups.com

I wrote my own recursion,

 

Function calling itself.

 

I ended up installing ColdFusion and running the app from there to get a more meaningful message.

 

I had an infinite loop, ColdFusion told me the cfloop tag timed out, easy

 

Railo told me the app timed out not on the loop or even in the loop, not so easy.

 

Odd that Railo actually timed out once then seemd to just run the loop forever.

 

All sorted though, thanks.

Dale Fraser

unread,
Dec 7, 2011, 7:34:03 AM12/7/11
to ra...@googlegroups.com

After running this on a large set of images however

 

Railo 3.3.1.000 Error (java.lang.OutOfMemoryError)

Message

Java heap space

Cause

java.lang.OutOfMemoryError

Dale Fraser

unread,
Dec 7, 2011, 7:36:36 AM12/7/11
to ra...@googlegroups.com

Interesting the out of memory persists after a Railo restart that seems strange to me.

From: ra...@googlegroups.com [mailto:ra...@googlegroups.com] On Behalf Of Ron Stewart


Sent: Wednesday, 7 December 2011 11:04 PM
To: ra...@googlegroups.com
Subject: [railo] Re: Crash / Hang

 

If I were in your shoes, I'd start by turning on debugging in the CFML server (if it isn't already on) and adding cftrace calls at key points within the logic, and then turn it loose on a very simple/small portion of the directory structure to see if that sheds any light on where things are going astray.

 

-- 

/ron

Michael Offner

unread,
Dec 7, 2011, 7:43:10 AM12/7/11
to ra...@googlegroups.com
Your Problem is that you run out of Heap space, i'm not familiar with your code because of that i can only do a suggestion at this point, but i think the problem is that something is loaded from directory (images?) that stays in memory (application scope pherhaps) and this is not released when request timeout occurs.
increase request timeout or/and heap space memory.

if you ask: 
how to increase Heap space memory?
my answer is:
what is the servlet engine (tomcat,jetty,resin ...) you use?
search google for: "<servlet-engine-name> increase heap space memory"

/micha

 

2011/12/7 Dale Fraser <da...@fraser.id.au>

Michael Offner

unread,
Dec 7, 2011, 7:47:19 AM12/7/11
to ra...@googlegroups.com
How you do the restart? in Railo admin? if yes, this just restart Railo not the servlet engine, restart the complete servlet engine in this case.

/micha



2011/12/7 Dale Fraser <da...@fraser.id.au>

Interesting the out of memory persists after a Railo restart that seems strange to me.

Dale Fraser

unread,
Dec 7, 2011, 7:50:37 AM12/7/11
to ra...@googlegroups.com

Digging further, it seems that its not the volume but specific files causing the memory issue.

 

Once I find a sample image that causes it, I'll post more.

From: ra...@googlegroups.com [mailto:ra...@googlegroups.com] On Behalf Of Michael Offner


Sent: Wednesday, 7 December 2011 11:43 PM
To: ra...@googlegroups.com

Michael Offner

unread,
Dec 7, 2011, 7:59:07 AM12/7/11
to ra...@googlegroups.com
FYI

Heap Space is a restricted resource and when you run out of this resource this must not be a failure.
Please have this in mind.

Dale Fraser

unread,
Dec 7, 2011, 8:05:04 AM12/7/11
to ra...@googlegroups.com

It cant handle large images.

 

It’s a 9mb image not that large by today's standards.

 

Crashes doing this

 

<cfimage source="#files.directory#\#files.name#" name="img" />

 

I can put the image somewhere if anyone wanted to duplicate it.

Michael Hnat

unread,
Dec 7, 2011, 8:10:59 AM12/7/11
to ra...@googlegroups.com
Hi,

one question about the image. What type of image is it? I guess a jpg. But: Is it a 'clean' jpg. In Photoshop you're able to save a PSD as jpg. It looks like a jpg but it has all photoshop infos (layers, etc.) within it.
Can you check the image and save it maybe as a clean jpg?

/michi

Michael Offner

unread,
Dec 7, 2011, 8:18:08 AM12/7/11
to ra...@googlegroups.com
of course but it somewhere, i will check if something special happens with this pic.

Dale Fraser

unread,
Dec 7, 2011, 8:35:26 AM12/7/11
to ra...@googlegroups.com

Your right,

 

Opened it, save as jpg (it was already jpg)

 

Then it processes fine. Something weird about that jpg.

 

I made my program allow for them anyway by catching the errors and handling the image.

 

Thanks

Peter Boughton

unread,
Dec 7, 2011, 9:35:21 AM12/7/11
to ra...@googlegroups.com
Sounds like you've solved the main problem now, but in case there's a
next time...

> Im not even sure where to look log file wise with railo

Where to look is (by default) in <webroot>/WEB-INF/railo/logs directory.

That includes both the standard logs
(application.log,exception.log,etc) and any custom logs you create.

And of course requesttimeout.log which would probably have helped
diagnose the issue quicker. :)

Reply all
Reply to author
Forward
0 new messages