Skip to content

Instantly share code, notes, and snippets.

@chingor13
Created January 12, 2018 18:57
Show Gist options
  • Save chingor13/f18392463896d34542b9c480ba3046bb to your computer and use it in GitHub Desktop.
Save chingor13/f18392463896d34542b9c480ba3046bb to your computer and use it in GitHub Desktop.
gRPC memory leak sample application for GAE flexible environment
env: flex
service: protobuf
runtime: php
manual_scaling:
instances: 1
runtime_config:
document_root: web
resources:
cpu: 1
memory_gb: 1
health_check:
check_interval_sec: 5
{
"name": "grpc-memoryleak",
"type": "project",
"require": {
"google/cloud": "^0.49",
"google/protobuf": "^3.5",
"ext-grpc": "*",
"php": "7.1.*"
}
}
<?php
# this file should be web/index.php
require_once '../vendor/autoload.php';
use Google\Cloud\Logging\LoggingClient;
$loggingClient = new LoggingClient();
echo 'Hello World!';
location = /_ah/health {
try_files $uri /index.php$is_args$args;
}
zend_extension=opcache.so
opcache.enable=1
extension=grpc.so
;extension=protobuf.so
realpath_cache_size=4096k
realpath_cache_ttl=7200
opcache.max_accelerated_files=10000
;memory_limit=512M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment