Start a new topic

HTTP/1.1 500 Internal Server Error


I'm getting the above error when sending to my custom endpoint, not every time but several times per day out of maybe 200 times.

This is my endpoint.

function onRequest(request, response, modules){

var push = modules.push, collectionAccess = modules.collectionAccess;

var iOSAps = { alert: request.body.message, badge: parseInt(request.body.count), sound: "default.wav" };

var iOSExtras = '';

var androidPayload = {message: request.body.message };

collectionAccess.collection('user').findOne({ "_id": collectionAccess.objectID(request.body.KinveyID) }, function(err, user) {

if (user)


push.sendPayload(user, iOSAps, iOSExtras, androidPayload);





Hi, can you provide some more details on the error? is there a JSON response being returned from the server, or any headers?
I'll check.
Hi Gary, Did you find more info?
Hi, The body contains the JSON I sent.

Error=HTTP/1.1 500 Internal Server Error,

Body={"KinveyID":"54493ed68f58b25922064af1","message":"SRChirp Alert","count":"74"}

Error=HTTP/1.1 500 Internal Server Error,

Body={"KinveyID":"5452e9f8c372846422072c99","message":"SRChirp Alert","count":"4"}

I forgot to look at the headers.

I'm also seeing this:

Error=Socket Error # 10060 Connection timed out.,

Body={"KinveyID":"54442d22614119070304191b","message":"SRChirp Alert","count":"86"}

However, the frequency of the errors is not as much as it used to be.
Hey Gary!

This looks like it actually might be a better question for our partners at Embarcadero and the RAD Studio support team.
I don't think so.

You see, I have written TCP and HTTP drivers for other projects. The 500 error is coming from your HTTP server. If it was not able to connect my end you give a timeout error. If the dns name was not able to be resolved my end would give a Server not found error.

Because most of the requests work, the only thing I can think of is perhaps I'm sending the requests too fast. Perhaps I should put in a longer delay between requests.
Hi Gary, we will need to see the actual error message returned by Kinvey in order to help you figure out the source of the issue. The response body included in your previous message (`{"KinveyID":"54493ed68f58b25922064af1","message":"SRChirp Alert","count":"74"}`) is not a standard Kinvey error response -- the response should be JSON containing `error`, `description` and `debug` properties.
Login or Signup to post a comment