Git Product home page Git Product logo

Comments (2)

SergeAx avatar SergeAx commented on July 19, 2024 1

You should use different PIDs for different websocket apps.

On Sep 16, 2016 15:35, "ryzhak" [email protected] wrote:

Hello.

Is it possible to run 2 websocket servers on 1 VDS?

I have 2 web applications on 1 VDS. Both of them use your yii2 websocket
extension.

To start the 1st websocket server I run:
cd /var/www/app1
./yii websocket/start notificationServer1

But when I run the 2nd websocket server:
cd /var/www/app2
./yii websocket/start notificationServer2

then I get "already started" in the console output. I want the 2nd server
working as well.

How can I make it work?

config1:
'websocket' => [
'class' => 'morozovsk\yii2websocket\Connection',
'servers' => [
'notificationServer1' => [
'class' => 'app\modules\v1\modules\notification\components
WebsocketDaemonHandler',
'pid' => '/tmp/websocket_chat.pid',
'websocket' => 'tcp://127.0.0.1:8004',
'localsocket' => 'tcp://127.0.0.1:8010'
]
],
],

config2:
'websocket' => [
'class' => 'morozovsk\yii2websocket\Connection',
'servers' => [
'notificationServer1' => [
'class' => 'app\modules\v1\modules\notification\components
WebsocketDaemonHandler',
'pid' => '/tmp/websocket_chat.pid',
'websocket' => 'tcp://127.0.0.1:8014',
'localsocket' => 'tcp://127.0.0.1:8024'
]
],
],

Hope you got what I mean. Thanks in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#22, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADHQEh1d_uhsFZtfoEjoM9OJ7OItoD0Gks5qqo0LgaJpZM4J-5GG
.

from websocket.

ryzhak avatar ryzhak commented on July 19, 2024

Thank you. I changed 'pid' in the config files and it worked.

from websocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.