Jimdo / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
281 stars 213 forks source link

stream_set_timeout() expects parameter 1 to be resource, boolean given #70

Open ThomWright opened 6 years ago

ThomWright commented 6 years ago

Error with relevant slice of the stack trace:

exception 'ErrorException' with message 
  'stream_set_timeout() expects parameter 1 to be resource, boolean given'
  in /var/www/vendor/jimdo/prometheus_client_php/src/Prometheus/Storage/Redis.php:100
Stack trace:
  #0 (): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
  #1 /var/www/vendor/jimdo/prometheus_client_php/src/Prometheus/Storage/Redis.php(100): Redis->setOption()
  #2 /var/www/vendor/jimdo/prometheus_client_php/src/Prometheus/Storage/Redis.php(142): Prometheus\Storage\Redis->openConnection()
  #3 /var/www/vendor/jimdo/prometheus_client_php/src/Prometheus/Gauge.php(31): Prometheus\Storage\Redis->updateGauge()
  #4 /var/www/app/Services/MetricsService.php(38): Prometheus\Gauge->set()

I don't know if this helps: https://stackoverflow.com/questions/22898810/cant-get-stream-set-timeout-to-work-in-foreach-array-loop

If you need any more information let me know, I don't really know anything about PHP but I can ask someone who does.