WebSocketBundle icon indicating copy to clipboard operation
WebSocketBundle copied to clipboard

Apache Threads Number

Open eduardo5000 opened this issue 7 years ago • 5 comments

Hello,

we have your bundle in our company running. In a physical machine and in a VPS.

A bit later we had run the websocket bundle the number of apache threads grow up so much. We can have 150 apache threads.

Apache in the VPS crash directly.

Do you know why?

What can we do to get things right?

Thx !

eduardo5000 avatar Apr 20 '17 12:04 eduardo5000

We are using zmq. And we have 200 users concurrently. The app is sending notifications continously.

We use your bundle to count the number of connected users, too.

Thx!

eduardo5000 avatar Apr 20 '17 12:04 eduardo5000

Hey, what do you mean by "apache threads" ? It's the number of opened connections ?

If you have 200 users it's normal to have like 150 connections opened from apache side. May be you need to tune your server configuration to handle it correctly.

What kind of resources is becoming busy when load is coming ? (cpu, ram etc) What are the specs of your VPS ?

I have no experience with apache :( So I can't really help you to figured out if problem come from apache config :/)

jjsaunier avatar Apr 20 '17 13:04 jjsaunier

We're tunning apache mpm parameters. We use prefork:

.- StartServers .- MinSpareServers .- MaxSpareServers .- MaxClients .- MaxRequestsPerChild

We have to restart apache server because is hanging every day.

Thx !

eduardo5000 avatar Apr 21 '17 06:04 eduardo5000

Are you using Apache server as reverse proxy for websocket connection ? If you are not, this problem is not related by the fact that your are using websocket app.

And if you are using Apache as reverse proxy, show me the socket configuration, because I know, Apache require a specific module in order proxy the socket connection.

Mpm prefork is related to http request only as regular such as fpm. Websocket server is not served by mpm or fpm.

Le ven. 21 avr. 2017 08:32, eduardo5000 [email protected] a écrit :

We're tunning apache mpm parameters. We use prefork:

.- StartServers .- MinSpareServers .- MaxSpareServers .- MaxClients .- MaxRequestsPerChild

We have to restart apache server because is hanging every day.

Thx !

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/GeniusesOfSymfony/WebSocketBundle/issues/234#issuecomment-296091741, or mute the thread https://github.com/notifications/unsubscribe-auth/ABroDbXPLspDKPGfXqf5zScMa3Uec16Mks5ryE1_gaJpZM4NC9j4 .

jjsaunier avatar Apr 21 '17 08:04 jjsaunier

Yes we're using reverse proxy from apache. Our configuration is:

<VirtualHost *:80> <Location "/wsauthoban"> ProxyPass "ws://domain:8090/" </Location> </VirtualHost>

domain is our internal domain.

Apache2ctl -M shows this:

core_module (static) so_module (static) watchdog_module (static) http_module (static) log_config_module (static) logio_module (static) version_module (static) unixd_module (static) access_compat_module (shared) alias_module (shared) auth_basic_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) filter_module (shared) mime_module (shared) mpm_prefork_module (shared) negotiation_module (shared) php5_module (shared) proxy_module (shared) proxy_wstunnel_module (shared) setenvif_module (shared) socache_shmcb_module (shared) ssl_module (shared) status_module (shared)

We're using reverse proxy because we can only leave from intranet by port 80.

Thx !

eduardo5000 avatar Apr 22 '17 02:04 eduardo5000