Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Lots of timeout when fetching items from database using doctrine #499

Open
fd6130 opened this issue Apr 21, 2021 · 4 comments
Open

Lots of timeout when fetching items from database using doctrine #499

fd6130 opened this issue Apr 21, 2021 · 4 comments
Assignees
Labels
kind/bug/possible Something probably isn't working priority/important

Comments

@fd6130
Copy link

fd6130 commented Apr 21, 2021

Describe the bug

I got an api which use doctrine to query the database and return json response. I tested it using wrk and the result is not that good due to lots of timeout.

❯ wrk -c100 -t4 http://127.0.0.1:9501/api/common/properties
Running 10s test @ http://127.0.0.1:9501/api/common/properties
  4 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.27s   562.48ms   1.99s    53.33%
    Req/Sec    15.54     11.15    50.00     72.38%
  389 requests in 10.05s, 124.18MB read
  Socket errors: connect 0, read 0, write 0, timeout 299
Requests/sec:     38.72
Transfer/sec:     12.36MB

Steps To Reproduce
I'm using default swoole.yaml config, APP_ENV=prod and also got pixelfederation/doctrine-resettable-em-bundle installed.

swoole:
    http_server:
        port: 9501
        host: 0.0.0.0
        running_mode: process
        socket_type: tcp
        ssl_enabled: false
        trusted_hosts: localhost,127.0.0.1
        trusted_proxies:
            - '*'
            - 127.0.0.1/8
            - 192.168.2./16

        # enables static file serving
        static: advanced
        # equals to:
        # ---
        # static:
        #     public_dir: '%kernel.project_dir%/public'
        #     strategy: advanced
        #     mime_types: ~
        # ---
        # strategy can be one of: (default) auto, off, advanced, default
        #   - off: turn off feature
        #   - auto: use 'advanced' when debug enabled or not production environment
        #   - advanced: use request handler class \K911\Swoole\Server\RequestHandler\AdvancedStaticFilesServer
        #   - default: use default swoole static serving (faster than advanced, but supports less content types)
        # ---
        # mime types registration by file extension for static files serving in format: 'file extension': 'mime type'
        # this only works when 'static' strategy is set to 'advanced'
        #
        #   mime_types:
        #       '*': 'text/plain' # fallback override
        #       customFileExtension: 'custom-mime/type-name'
        #       sqlite: 'application/x-sqlite3'

        # enables hot module reload using inotify
        hmr: auto
        # hmr can be one of: off, (default) auto, inotify
        #   - off: turn off feature
        #   - auto: use inotify if installed in the system
        #   - inotify: use inotify

        # enables api server on specific port
        # by default it is disabled (can be also enabled using --api flag via cli)
        api: false
        # equals to:
        # ---
        # api:
        #     enabled: true
        #     host: 0.0.0.0
        #     port: 9200

        # additional swoole symfony bundle services
        services:
            # see: \K911\Swoole\Bridge\Symfony\HttpKernel\DebugHttpKernelRequestHandler
            debug_handler: true

            # see: \K911\Swoole\Bridge\Symfony\HttpFoundation\TrustAllProxiesRequestHandler
            trust_all_proxies_handler: true

            # see: \K911\Swoole\Bridge\Symfony\HttpFoundation\CloudFrontRequestFactory
            cloudfront_proto_header_handler: true

            # see: \K911\Swoole\Bridge\Doctrine\ORM\EntityManagerHandler
            entity_manager_handler: true
            
            # see: \K911\Swoole\Bridge\Upscale\Blackfire\WithProfiler
            blackfire_profiler: false


        # swoole http server settings
        # see https://www.swoole.co.uk/docs/modules/swoole-server/configuration
        settings:
            reactor_count: 4
            worker_count: 8
            # when not set, swoole sets these are automatically set based on count of host CPU cores
            task_worker_count: auto # one of: positive number, "auto", or null to disable creation of task worker processes (default: null)

            log_level: auto
            # can be one of: (default) auto, debug, trace, info, notice, warning, error
            #   - auto: when debug set to debug, when not set to notice
            #   - {debug,trace,info,notice,warning,error}: see swoole configuration

            log_file: '%kernel.logs_dir%/swoole_%kernel.environment%.log'
            pid_file: /var/run/swoole_http_server.pid

            buffer_output_size: 2097152
            # in bytes, 2097152b = 2 MiB

            package_max_length: 8388608
            # in bytes, 8388608b = 8 MiB
        
            worker_max_request: 0
            # integer >= 0, indicates the number of requests after which a worker reloads automatically
            # This can be useful to limit memory leaks
            worker_max_request_grace: ~
            # 'grace period' for worker reloading. If not set, default is worker_max_request / 2. Worker reloads
            # after 'worker_max_request + rand(0,worker_max_request_grace)' requests

Expected behavior
I think it suppose to be low timeout as possible? Otherwise it make no difference with apache/nginx serving.

Environment (please complete the following information):

  • OS: Zorin OS 15.3 Core
  • PHP Version: 7.4.16
  • Swoole Version: 4.6.4
  • Symfony Version: 5.2.6
  • Running in docker: No

Logs
If possible/applicable please provide symfony/swoole logs here.

Symfony/Swoole Logs

# PASTE LOG LINES HERE

[2021-04-21 18:13:21 @27495.0]	WARNING	file_put_contents(:110): open(/var/run/swoole_http_server.pid) failed, Error: Permission denied[13]
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#76 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#25 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#76 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#25 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#98 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#98 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#38 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#38 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#71 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#71 is closed
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#59 is closed
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#59 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#88 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#88 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#92 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#92 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#33 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#33 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#21 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#21 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#7 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#7 is closed
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#142 is closed by client
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#91 is closed
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#91 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#18 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#18 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#95 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#95 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#46 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#46 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#29 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#29 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#100 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#100 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#41 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#41 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#96 is closed
[2021-04-21 18:13:41 *27542.6]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#96 is closed
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#150 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#158 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#166 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#174 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#182 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#190 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#198 is closed by client
[2021-04-21 18:13:41 #27495.2]	WARNING	send_to_connection: connection#206 is closed by client
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#15 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#15 is closed
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#67 is closed
[2021-04-21 18:13:41 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#67 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#37 is closed
[2021-04-21 18:13:41 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#37 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#26 is closed
[2021-04-21 18:13:41 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#26 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#54 is closed
[2021-04-21 18:13:41 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#54 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#49 is closed
[2021-04-21 18:13:41 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#49 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#3 is closed
[2021-04-21 18:13:41 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#3 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#23 is closed
[2021-04-21 18:13:41 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#23 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#75 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#75 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#45 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#45 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#57 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#57 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#34 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#34 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#31 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#31 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#62 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#62 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#99 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#99 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#20 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#20 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#53 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#53 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#8 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#8 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#70 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#70 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#2 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#2 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#42 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#42 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#39 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#39 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#28 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#28 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#89 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#89 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#13 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#13 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#10 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#10 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#78 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#78 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#47 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#47 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#50 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#50 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#65 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#65 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#36 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#36 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#77 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#77 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#55 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#55 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#86 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#86 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#19 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#19 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#9 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#9 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#85 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#85 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#73 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#73 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#44 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#44 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#94 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#94 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#27 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#27 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#6 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#6 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#58 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#58 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#61 is closed
[2021-04-21 18:13:42 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#61 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#81 is closed
[2021-04-21 18:13:42 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#81 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#52 is closed
[2021-04-21 18:13:42 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#52 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#5 is closed
[2021-04-21 18:13:42 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#5 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#35 is closed
[2021-04-21 18:13:42 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#35 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#79 is closed
[2021-04-21 18:13:42 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#79 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#66 is closed
[2021-04-21 18:13:42 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#66 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#14 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#14 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#43 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#43 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#93 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#93 is closed
[2021-04-21 18:13:43 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#97 is closed
[2021-04-21 18:13:43 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#97 is closed
[2021-04-21 18:13:43 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#87 is closed
[2021-04-21 18:13:43 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#87 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#11 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#11 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#74 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#74 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#22 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#22 is closed
[2021-04-21 18:13:43 *27541.5]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#63 is closed
[2021-04-21 18:13:43 *27541.5]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#63 is closed
[2021-04-21 18:13:43 *27543.7]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#17 is closed
[2021-04-21 18:13:43 *27543.7]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#17 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#69 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#69 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#82 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#82 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#51 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#51 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#60 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#60 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#30 is closed
[2021-04-21 18:13:43 *27540.4]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#30 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#83 is closed
[2021-04-21 18:13:43 *27537.1]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#83 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#101 is closed
[2021-04-21 18:13:43 *27539.3]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#101 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#12 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#12 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#68 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#68 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#90 is closed
[2021-04-21 18:13:43 *27536.0]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#90 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 198 bytes failed, because session#84 is closed
[2021-04-21 18:13:43 *27538.2]	NOTICE	finish (ERRNO 1004): send 334534 bytes failed, because session#84 is closed

@fd6130 fd6130 added kind/bug/possible Something probably isn't working priority/important labels Apr 21, 2021
@k911
Copy link
Owner

k911 commented Apr 24, 2021

Hi, TBH I don't know how we could solve issue. Personally, I've not used doctrine resettable bundle so I cannot help you. I've only used this https://github.com/k911/swoole-bundle/blob/develop/src/Bridge/Doctrine/ORM/EntityManagerHandler.php and it was enough for my purposes. Currently, I'm not using any of this so either you can contact pixelfederation or use some other approach like this: https://github.com/swoole/swoole-src#mysql

@fd6130
Copy link
Author

fd6130 commented Apr 24, 2021

Hi, TBH I don't know how we could solve issue. Personally, I've not used doctrine resettable bundle so I cannot help you. I've only used this https://github.com/k911/swoole-bundle/blob/develop/src/Bridge/Doctrine/ORM/EntityManagerHandler.php and it was enough for my purposes. Currently, I'm not using any of this so either you can contact pixelfederation or use some other approach like this: https://github.com/swoole/swoole-src#mysql

How can i use the EntityManagerHandler? Just inject EntityManagerInterface instead? But i believe it will just the same as timeout when WRK test fetching a collection of data. But good thing is if i just fetching single data from database WRK got no timeout.

@k911
Copy link
Owner

k911 commented Apr 24, 2021

swoole:
    http_server:
        services:
            # see: \K911\Swoole\Bridge\Doctrine\ORM\EntityManagerHandler
            entity_manager_handler: true

I believe because you already have it configured you either need to uninstall other bundle or turn off this service - I think you shouldn't use both at the same time.

@fd6130
Copy link
Author

fd6130 commented Apr 24, 2021

I uninstalled the other bundle but unfortunately the test result still the same. I got no timeout when i fetch single data from database but timeout when fetching all data from database in wrk test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug/possible Something probably isn't working priority/important
Projects
None yet
Development

No branches or pull requests

2 participants