500 internal server error

87 views
Skip to first unread message

Inge Lamote

unread,
Jun 25, 2014, 8:53:47 AM6/25/14
to cfwh...@googlegroups.com

I have build a simple application (CF9, MS SQL 2005, IIS 7, windows server 2008, cfwheels 1.1.8).

I have a model Asset.cfc with a many-to-many relation with Term.cfc, Usecase.cfc and Relatedassets.cfc (many-to-many with the same table).
Everything is working fine until I have about 10 records in the Assets table.
Every time I try to add/update an extra asset I get a 500 - internal server error. I have changed the error message in IIS from custom error pages to detailed error pages, but I get no extra info.
If change the create function to just do a cfdump, I get the same internal server error.
    <cffunction name="create">
        <cfif  isdefined("params.key")>
            <cfset asset = model("asset").findByKey(params.key)>
            <cfset asset.update(params.asset)>
        <cfelse>
            <cfset asset=model("Asset").new(params.asset)>
            <cfset asset.save()>
        </cfif>
    </cffunction>
As you can see the assets table has a lot of columns (attachment).
If I clean up the assets table ( + assetsTerms and assetsUsecases) the error is gone until I have inserted another 10  to 15 records.
You can see my application at http://interoperabilityassets.ramit.be/

Inge



assets.jpg

Chris Peters

unread,
Jun 25, 2014, 9:05:25 AM6/25/14
to cfwh...@googlegroups.com
Without knowing the exact error, this would be pretty hard to debug.

Does anything appear in the logs in the CF admin?


--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.



--

Chris Peters
Web Developer
Liquifusion Studios

chris....@liquifusion.com
Skype: liquifusion.support
www.liquifusion.com

Inge Lamote

unread,
Jun 25, 2014, 9:45:28 AM6/25/14
to cfwh...@googlegroups.com
I cannot find anything relevant in the CF logs (application, exception and server).
Inge

Chris Peters

unread,
Jun 25, 2014, 9:52:23 AM6/25/14
to cfwh...@googlegroups.com
Can you wrap it like this? Does that expose any info? If not, then perhaps the request is timing out?

<cftry>
  <!--- Code causing error --->
  <cfcatch>
    <cfdump var="#cfcatch#" abort>
  </cfcatch>
</cftry>

Inge Lamote

unread,
Jun 25, 2014, 10:21:26 AM6/25/14
to cfwh...@googlegroups.com
I have integrated the code but I get the same 500 error.
Could it be that this error has nothing the do with CFwheels but with IIS?
Inge

Chris Peters

unread,
Jun 25, 2014, 10:26:12 AM6/25/14
to cfwh...@googlegroups.com
Perhaps IIS logs would shed some light on that? I'm an Apache guy myself. :)

Per Djurner

unread,
Jun 25, 2014, 10:52:59 AM6/25/14
to cfwh...@googlegroups.com
Make sure Wheels is set to "design" or "development" mode.
If it's set to "production" mode a 500 error is thrown by Wheels and that is perhaps what IIS is intercepting.

Inge Lamote

unread,
Jun 25, 2014, 10:57:19 AM6/25/14
to cfwh...@googlegroups.com
Just to exclude some things:
Cfwheels has no problems with the length (number of colums) of the asset table and the fact that a lot of the colums are nvarchar(max)?
Something else I have noticed.
this is the URL where I get the error message after clicking the save button.
http://interoperabilityassets.ramit.be/index.cfm?controller=asset&action=create
If copy this URL in a new in a new tab I see that the controller and action worked correctly  because I see the correct message:"Name can't be empty"
 <cfif asset.hasErrors()>
Inge

Inge Lamote

unread,
Jun 25, 2014, 11:00:27 AM6/25/14
to cfwh...@googlegroups.com
I'am in production mode.
Inge

Simon Allard

unread,
Jun 25, 2014, 12:29:07 PM6/25/14
to cfwh...@googlegroups.com
If you are in production mode you'll never see wheels errors, but get the 500 error. You should set your environment to design while working on your website.

A+
Simon

Inge Lamote

unread,
Jun 26, 2014, 2:07:54 AM6/26/14
to cfwh...@googlegroups.com
Sorry I was in such a hurry that I confused the modes: I was always in development mode.

Inge Lamote

unread,
Jun 26, 2014, 9:02:05 AM6/26/14
to cfwh...@googlegroups.com
I could resolve the problem for a big part: the assets table had too much fields. I have split the table and no work with a many-to-one relationship. 
But know I found I have too many checkboxes. When I select more than 12 I get the same server error.
Somebody already mentioned this problem but without getting a real answer.
 https://groups.google.com/forum/#!msg/cfwheels/Ulw-UB_IgKM/DXwO6ME7FIkJ 
I also found this article:
http://stackoverflow.com/questions/8275830/many-to-many-relationship-with-cfwheels-without-composite-keys
would this help?

Any other suggestions?
Reply all
Reply to author
Forward
0 new messages