0

Hi i am new to google cloud, Working since 5days. I make a collection on firebase has type google/cloud-firestore, and i am using it in my php project.

It working fine. but since 2 hour it showing error-

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\orDeal Cloud\composer\vendor\grpc\grpc\src\lib\ServerStreamingCall.php on line 48

I make a test.php file for testing database connection-

require_once __DIR__ . '/composer/vendor/autoload.php';
use Google\Cloud\Firestore\FirestoreClient;

$db = new FirestoreClient([
    'projectId' => 'myProjectId'
]);
$snapshot = $db->collection("users")->documents();
print_r($snapshot);

But still it showing error.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141

1 Answers1

0

Edit your php.ini to increase the timeout

max_execution_time = 300

or do it using ini_set function

// Set timeout in seconds (0 = no timeout)
ini_set('max_execution_time', 300);
inquam
  • 12,664
  • 15
  • 61
  • 101
  • That will increase time of execution. – AMAZING AMAN May 25 '19 at 09:47
  • i am getting problem from grpc plugin. – AMAZING AMAN May 25 '19 at 09:48
  • Well "Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\orDeal Cloud\composer\vendor\grpc\grpc\src\lib\ServerStreamingCall.php on line 48" is the exact message PHP would give for a timeout. An extension that have its own timeout setting sounds strange and I don't think I have ever heard about that before. – inquam May 25 '19 at 18:34