Open cosmicdust471 opened 3 years ago
Thanks for reporting. Can you try to reproduce this in a PR with a failing test?
I think my problem is with scalability. I'm running my parse server on multiple cores so how would I go on about doing this?
I've created a redis server on my local machine running on port :6379
Server:
app.use('/parse', new ParseServer({
databaseURI: DATABASE_URI,
appId: APP_ID,
masterKey: MASTER_KEY,
serverURL: 'http://localhost/parse',
cloud: __dirname + '/cloud/main.js',
liveQuery: {
classNames: ['Order', 'Sale'],
redisURL: 'redis://localhost:6379'
}
}));
var httpServer = require('http').createServer(app);
httpServer.listen(80);
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer,{
redisURL: 'redis://localhost:6379'
});
Client:
Parse.initialize(APP_ID);
Parse.serverURL = 'http://localhost/parse';
However I only receive events when running in single core. Am I missing something?
I'm closing this as it does not seem to be a Parse Server issue.
For help with Parse Server, here are some resources you can try:
Feel free to comment if you have any questions and we can re-open this issue.
@franalt you resolve this issue? I have the same problem with pm2 cluster mode
@franalt How did you resolve this issue? "I'm facing an issue with live queries. The client receives the "open" event but doesn't receive the "create" or "update" events."
I'm facing the same issue.. is there a solution without the redis server?
@ckarmy were you able to resolve your issue?
@ckarmy were you able to resolve your issue?
No :( I couldn't figure out how to make it work!
Is it the same issue as in the description? If so, we can re-open the issue, otherwise please open a new issue.
@mtrezza Yes, its the same issue.. kindly reopen it..
Is it the same issue as in the description? If so, we can re-open the issue, otherwise please open a new issue.
i even tried with redis server to scale it. but i got the same issue. i'm able to trigger the subscription open event. But the subscription create, update, delete etc events are not triggered..
@ckarmy were you able to resolve your issue?
No :( I couldn't figure out how to make it work!
So, what was the work around that you did, instead of using live query..?? Kindly can you tell..
It is the exact same issue as posted originally?
The client receives the "open" event but doesn't receive the "create" or "update" events.
Hi, I got my LiveQuery working:
var express = require('express')
const { default: ParseServer, ParseGraphQLServer, RedisCacheAdapter } = require('parse-server');
const redisURL = process.env.REDIS_URL
const liveQueryCollection = ["Your","Classes","Goes","Here"]
var redisOptions = { url: redisURL }
var redisCache = new RedisCacheAdapter(redisOptions)
var api = new ParseServer({
...
...
cacheAdapter: redisCache,
liveQuery: {
classNames: liveQueryCollection,
redisURL: redisURL,
},
rateLimit: {
requestPath: '*',
requestTimeWindow: 10 * 60 * 1000,
requestCount: 5,
errorResponseMessage: "Too many requests. Try again after 10 minutes.",
redisUrl: redisURL
}
})
// Start the parse
api.start()
...
...
...
// This will enable the Live Query real-time server
ParseServer.createLiveQueryServer(httpServer, {
redisURL: redisURL
})
Parse version: 6.1.0
However, I got a log saying: error: Could not connect to redisURL in rate limit: Error: Socket already opened
@keanallen This issue only happens if you use LiveQuery with redis, otherwise it works fine?
New Issue Checklist
Issue Description
I'm facing an issue with live queries. The client receives the "open" event but doesn't receive the "create" or "update" events.
Server setup:
Client setup:
Environment
Server
Database
Client
Logs
info: Create new client: 3e332475-fabe-488c-9a9c-fd6b69cc3ce6