404 Not Found Nginx/1.12.0

Asked

Viewed 468 times

0

I’m in big trouble I have no idea what it might be.

I send PUSH notifications some APPS, functional normally but a specific APP that has many users is giving the following error.

The call in GCM is as follows:

$url    = 'https://android.googleapis.com/gcm/send';
$fields = array(
    'data' => array(
        "mensagem" => $message
    ),
    'registration_ids' => $registatoin_ids
);
if (is_array($data)) {
    foreach ($data as $key => $value) {
        $fields['data'][$key] = $value;
    }
}

$headers = array(
    'Authorization: key=' . apiKey,
    'Content-Type: application/json'
);
$ch      = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
$result = curl_exec($ch);
if ($result === FALSE) {
    die('Curl failed: ' . curl_error($ch));
}

curl_close($ch);

404 Not Found Nginx/1.12.0

inserir a descrição da imagem aqui

  • "... that has many users"? How so? You use this code in several apps, but in a specific app does not work?! You would have to give more details of the problem.

  • Hello friend, it works like this: I have a PUSH panel where I choose the app to push, all apps work but I have an APP that has more than 100 thousand users, the PUSH GCM service needs to be sent to every 1000 users, so I have a loop loop that keeps sending the notifications from 1000 to 1000 when it’s near the END it presents me this message 404 Not Found Nginx/1.12.0

  • I believe it may be the time that is being processed PHP page and it is taking to answer an AJAX request.

  • Maybe a possible timeout problem then. I haven’t seen anyone report it here.

  • Only I don’t know if the problem is in google(GCM), in the PHP page that makes the integration with google service or my ajax code that makes the request for the PHP page.

  • Why don’t you try migrating to the FCM? On the GCM page there is even a warning about this https://developers.google.com/cloud-messaging/

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.