deepstream.io: Socket hangs up most of the time
Use Case
I have nodejs application which will handle all subscription logic and have API in php application. whenever something changed my php application emit the event to deepstream and nodejs handle it.
Problem comes when I added authentication server. So my deepstream conf having following.
serverName: UUID
showLogo: true
logLevel: DEBUG
libDir: /var/lib/deepstream
sslKey: null
sslCert: null
sslCa: null
connectionEndpoints:
websocket:
name: uws
options:
port: 6020
host: 0.0.0.0
urlPath: /deepstream
healthCheckPath: /health-check
heartbeatInterval: 30000
outgoingBufferTimeout: 0
unauthenticatedClientTimeout: 180000
maxAuthAttempts: 3
logInvalidAuthData: false
maxMessageSize: 1048576
http:
name: http
options:
port: 7000
host: 0.0.0.0
allowAuthData: false
enableAuthEndpoint: false
authPath: /auth
postPath: /
getPath: /
healthCheckPath: /health-check
allowAllOrigins: true
origins:
- localhost
- 192.168.1.23
- 'http://192.168.1.23'
logger:
name: default
options:
colors: true
logLevel: INFO
storageExclusion: null
auth:
type: http
options:
endpointUrl: 'http://192.168.1.23/api/isvalid'
permittedStatusCodes:
- 200
requestTimeout: 10000
permission:
type: config
options:
path: ./permissions.yml
maxRuleIterations: 3
cacheEvacuationInterval: 60000
rpcAckTimeout: 1000
rpcTimeout: 10000
cacheRetrievalTimeout: 1000
storageRetrievalTimeout: 2000
dependencyInitialisationTimeout: 2000
listenResponseTimeout: 500
lockTimeout: 1000
lockRequestTimeout: 1000
broadcastTimeout: 0
I need to run deepstream built-in API server for php client as mentioned and also need a authentication handler which leads to socket hangs up situation.
I have also increased the requestTimeout
option but still I’m facing same problem.
Any Idea how can I solve this or any better solution for my use case. Thank you
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 19 (4 by maintainers)
If you see the issue again please let me know!
Hi, I’m using the old deepstream version 3.1.0. the load was not very high so the first auth request I send to deepstream was working. The next requests doesnt work. But I think the main issue was a corrupted MongoDB collection for deepstream. After an re init of all collections everything worked fine.
@kamerk22 Waiting for guys to resolve it/ I do not know the reason