I'm using ColdFusion 5 and specifying a timeout=2 on the CFHTTP tag. But I've seen the CFHTTP take much longer, sometimes as much as 8 seconds. I thought the timeout parameter was the max time the CFHTTP would execute.
Has anyone seen this before?
You might need to add the throwonerror="yes" parameter as well, to make it fail and throw an error message.
I'm not sure if CF5 has that though, it has been a while since I used that version. :)
Might be that your app has some performance issues, maybe reviewing the code, for better performance, might be of more help.
Related
Can anyone provide a workaround for this bug
Our app is managing a lot pages with many posts, but since 5 days ago we've had huge problems with that bug.
90% of our posts gain the above described error, 10% are working well.
After many hours of testing we know it's something about the "link" parameter.
Without it, we can post without any errors.
We tried to only post our images without the link parameter but after a hour of posting correctly we got a new error.
(#368) The action attempted has been deemed abusive or is otherwise disallowed. Interesting that posting an image without a link parameter is abusive.
We tried to regenerate all user_tokens and page_tokens but no success, the error still exists.
We tried to pause the service for 24 hours and start it again, no effect.
Does anyone have an idea or a workaround for this bug?
It doesn't seem that it was patched on Tuesday. Because of that we need a solution, we can't hold the service down for one more week.
the workaround from "thefreeman" works for me also:
add more admin(s) to the pages
generate tokens for the new admin
juggle the tokens to stay below limit
Limit per account (for me) seems to be about 150 posts per day.
Limit seems to reset at a certain point in time. Midnight at facebook?
(i am managing 60 Pages and posting roughly 200 updates per day.)
certainly not a nice solution, but the bugs in the fb-bugtracker don't seem to get too much attention :(
sometimes i get a new error: "OAuthException (#1500) The url you supplied is invalid".
Trying again later with the same data works though...
I have a number of dynamically generated like buttons on a site (http://www.thepropaganda.com), and so I use FB.XFBML.parse to generate them all. For some reason the parser always gets into a loop and repeatedly generates "domain and protocol must match" errors as per FB.SO Question 3577947. All the facebook social plugins are created correctly.
I understand what the errors are, and they're not really a problem, other than that there's thousands of them. Funnily enough this doesn't happen at all in incognito.
I'd really like to know what's going on here, as it's a live site for a paying client.
No idea why that's occurring but if it doesn't happen in incognito I'm assuming it's something to do with a cookie/session variable.
I would have added this as a comment but I need 50 rep to do it :(
Since we installed ColdFusion 10, we have received several error messages such as
"Method ifspDueDt is not found in component [fullpath]\incTabCnt.cfc."
We are trying to call a method named ifspDueDt. It is called in one place in our entire application and when it's called, it's called from ifsp.cfc. We use engine.js for our AJAX, so the call looks like this:
http('POST','../Components/ifsp.cfc?method=ifspDueDt', IFSPDueDtResp, param);
We are completely baffled by the fact that for some reason and only on some occasions (certainly not all the time), ColdFusion is looking for ifspDueDt in incTabCnt.cfc instead of ifsp.cfc. There is no other place where this method is called. What could be causing this?
We probably get 1-2 of these errors per week, whereas we have several hundred users accessing the system.
It looks like ColdFusion 10 update 3 solves this problem, at least for the code I'm working on. Having said that, I don't yet recommend upgrading, due to a series of other issues with update 3. See the comments on the CF blog post announcing update 3. Note that at least two other people have posted in that comment thread that they are still experiencing the "wrong page displayed" problem, which seems like it's closely related to the "wrong component" problem we're discussing in this question.
We were fortunate that we don't use CF scheduled tasks, and we did not hit any of the startup errors or other problems in our testing environment, although one of my teammates did hit a number of problems which corrupted his dev environment.
I really hope Adobe moves quickly with update 4 (or a replacement for update 3).
I sometimes get
Could not find the ColdFusion Component or Interface Answer.
and simply doing a refresh fixes the problem.
This is not case where the program is being refreshed from ftp while I try to browse from it: no development is being done. But every once in a while I'll get it while trying to do a createobject.
Q: Is there a best practice for sleeping and trying again if instantiating a component fails?
Are you using a cluster of servers? If so perhaps you have one server misconfigured - perhaps a missing mapping - and when you get served from that server you see the issue? That might explain the way it seems to only sometimes happen.
By the way, instansiation of CFCs should always work - you should not be trying to code around this issue by sleeping and trying again.
Phillip, any chance this is on cf 9.0.1, and you're using the "import" keyword?
The reason I ask is that I've seen behavior -- and logged a bug report on it -- where if I have two different object creations on the same page (or in another CFC... doesn't matter), both from the same package, and I'm not using the fully qualified CFC name but instead am using import, then the first createObject() will succeed and the second will fail with the "could not find ... " error.
I wonder if something like that could be at work here.
I think I just realized how restrictive my web host is when they wouldn't let me use cfdump. This actually kind of angers me, cause really, what harm is dump going to do? Anyway my question is has anyone written a cfdump alternative that will kick out complex types of data or can link me to a site with a code example? Can't really used cfc's or udfs either cause guess what, they're blocked too. Anyway looking for something simple that I can just paste in my cfml and I will be happy. It's sad that I used to be able to do this, but have forgotten a lot of that skillset since I moved into Flex and AS.
oh and they're using cf7, so no cf8 or 9 tricks ;-)
Thanks in advance.
You probably don't want to hear "Change to another hosting company" but if they're that restrictive, you're really limited in what you can do. I've actually never heard of a host that blocks cfdump although I know of a few that still, stupidly, block createObject().
Depending on exactly what they've blocked, you may be able to copy WEB-INF/cftags/dump.cfm from your local ColdFusion installation to a folder inside your application and then invoke it with cfmodule:
<cfmodule template="dump.cfm" var="#something#"/>
#Sean Corfield is right -- switch hosts.
In the meantime, there was a custom tag called "cf_dump" from the era of CF4. I have no idea if it will work on 7, but you could always try to get it working.
cf_dump at Adobe
In case anyone else comes across this old thread as I have just done, do not blindly following to the advice of "change your host", as this is very poor advice. make the effort to speak with your host before jumping to conclusions.
The host have likely not blocked cfdump they have blocked Java, which is a good thing as this means they take security seriously. CFdump uses java, thus why it does not work.
Allowing Java in CF is a very serious security issue as it completely bypasses all security sandboxes and without giving too much away basically means that any other customer on the same server could hack your site and steal your data as well as hacking/crashing ColdFusion itself.
Unfortunately blocking java does disable quite a lot of useful features and breaks most frameworks, so it is a toss up between functionality or security, so bear this in mind before you decide to go and find a host that enables everything and has no security.
At the end of the day if you want access to all of ColdFusion's functionality then you need your own server or VPS.
I've actually been looking for this for some time and today I actually stumbled across the solution. Unfortunately, I didn't come up with this. Thanks and credit goes to John Whish.
http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/using-onerror-method-of-application-cfc-47
Basically he's figured out most of the CFDump data can be called in the Application.cfc onError function.