relay: Timeout / endless response

Hello again.
I have successfully built php 8.3 with relay (as discussed in #50) but there seems to be a problem.
I have symfony project with https://github.com/snc/SncRedisBundle and as suggested in documentation, simply changing config from phpredis to relay should be sufficient enough to get everything working. But unfortunetely this does not work as it just results in endless response => timeout.
Test from your documentation (https://relay.so/docs/1.x/installation#http-test) results in same timeout.
this is php -ri relay response:

relay

Relay Support => enabled
Relay Version => 0.6.2-dev
Available serializers => php, json, igbinary, msgpack
Available compression => lzf, zstd, lz4
Git SHA => 09915f3161b3ace120cf175708446bda0871bc0a
relay.enabled => true
relay.key =>  
relay.maxmemory => 33554432
relay.maxmemory_pct => 75
relay.maxmemory_limit => 33554432
relay.eviction_policy => noeviction
relay.eviction_sample_keys => 128
relay.initial_readers => 128
relay.invalidation_poll_usec => 5
relay.pconnect_default => 1
relay.max_endpoint_dbs => 32
Cache available => 33500240
Binary UUID => 38f15393-adc3-4661-84d6-683cf9d8128a
License state => unknown
License memory cap => 0
License request id =>  
relay.loglevel => none
relay.logfile => /var/log/relay.log
Allocator => relay

This is what is written in /var/log/relay.log:

[1678479521.631641 DBG 6751] shmalloc.c:202 Allocated 33554432 byte pool (head: 7f28853bf000, curr: 7f28853c0020, alignment: 16)
[1678479521.631754 DBG 6751] cache.c:43 EPOCH[malloc]: 7f28853c6ea0 (5303 bytes)
[1678479521.631794 NOT 6751] relay.c:2212 STARTUP - Relay has started...
[1678479521.673917 DBG 6752] relay.c:2863 RINIT - Requests (1 total, 1 active, 1 max)
[1678479521.673940 DBG 6752] relay.c:2830 HTTP_HOST - Failed to find HTTP_HOST or it's not a string.
[1678479521.673945 DBG 6752] relay.c:2806 PLINK - Uninstalling handlers for 0 links
[1678479521.674294 NOT 6752] relay.c:3371 CRON TASKS - GC(keys): 1; GC(msg): 0, EVICTED: 0 keys
[1678479521.674304 NOT 6752] relay.c:3378 CRON  PROC - hits/miss: 0/0 (0.00%), oom: 0, errors: 0
[1678479521.674310 NOT 6752] relay.c:3329 CRON STATS - Memory 54144/33554432 bytes (0.16%)
[1678479521.674319 DBG 6752] relay.c:2737 PLINK - installing handlers for 0 links
[1678479521.674329 DBG 6752] relay.c:2956 RSHUTDOWN - Finished request
[1678479521.689842 DBG 6751] relay.c:2863 RINIT - Requests (2 total, 1 active, 1 max)
[1678479521.689864 DBG 6751] relay.c:2830 HTTP_HOST - Failed to find HTTP_HOST or it's not a string.
[1678479521.689869 DBG 6751] relay.c:2806 PLINK - Uninstalling handlers for 0 links
[1678479521.689964 DBG 6751] relay.c:2737 PLINK - installing handlers for 0 links
[1678479521.689975 DBG 6751] relay.c:2956 RSHUTDOWN - Finished request
[1678479521.700485 NOT 6751] relay.c:2235 Relay is shutting down, bye bye

If you want to check what is wrong on my build, here are:
dockerfiles: https://github.com/k0d3r1s-library/docker-php-fpm
image: https://hub.docker.com/layers/k0d3r1s/php-fpm/8.3.0-dev-testing/images/sha256-327757cf2eadca641a17b221e684142dcec24b54e0dbcec20088fff55fe64525

Edit: I am connecting to redis in different container, not on localhost

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

I should have them up today.

Awesome. When we should get an official build that is not a zip in comment? 😃

it works 😃

Both relay-pkg.so and relay-ck-pkg.so from the alpine tarball should work. It’s probably better to use relay-ck-pkg.so which links with hiredis dynamically, since phpiredis is also linking with hiredis dynamically.

wget -q https://builds.r2.relay.so/dev/relay-dev-php8.3-alpine-x86-64.tar.gz && \
tar xvf relay-dev-php8.3-alpine-x86-64.tar.gz >/dev/null && \
cd relay-dev-php8.3-alpine-x86-64 && \
ldd relay-ck-pkg.so|grep hiredis
	libhiredis.so.1.1.0 => /usr/local/lib/libhiredis.so.1.1.0 (0x00007f8f5a40d000)
	libhiredis_ssl.so.1.1.0 => /usr/local/lib/libhiredis_ssl.so.1.1.0 (0x00007f8f5a406000)"

You should be able to use the relay-ck-pkg.so file in the Alpine 8.3 tarball. That’s basically what I uploaded to the thread earlier this week.

Oh, my bad. You’re right, i’m missing one hyphen 😦
Now all is great, everything works 😃

@k0d3r1s This is excellent, might be a 8.3 related issue with FPM. @michael-grunder can take a look at this next week.