Live-queries not responding running Quasar (vue) with Parse plattform

I have a parse server running on digital ocean connected with my quasar framework.

Im trying to get my livequerys to work on my parse server. This is what I have done:

  1. ssh into digital ocean and added the class for the livequery in mine docker file:

    - PARSE_SERVER_LIVE_QUERY={"classNames":["MyClass"]}

  2. Init the subscription in created as below. Subscription prints at opening as it should but when I manually edit something in my parseserver nothing prints in the console. I expected it should print every time something changes in the database.

  created: function() {
    this.initSubscription();
  },

  methods: {
    initSubscription: async function() {
      const MyClass= parse.Object.extend("MyClass");
      const query = new parse.Query(MyClass);
      // do a bit of filtering so only display row where the column "myColumn" matches "thisValue"
      query.equalTo("myColumn", "thisValue");

      // create a subscription
      let subscription= await query.subscribe();
      
      // THIS PRINTS
      subscription.on("open", () => {
        console.log("subscription opened");
      });

      // BUT NONE OF THESE WORKS WHEN MANUALLY CHANGING IN DATABASE
      subscription.on("create", object => {
        console.log("object created", object);
      });
      subscription.on("update", object => {
        console.log("object updated", object);
      });
      subscription.on("enter", object => {
        console.log("object entered", object);
      });
    },

What am I doing wrong?

I had this guide as reference

Your query is query but below that you are using queryWand

queryWand.equalTo("myColumn", "thisValue");

Are you manually changing items in mongo or are you using another client / Parse Dashboard to do so?

Oh. Just a typo. I rewrote it a bit for the forumpost. It edited my post

I do it manually by ssh into my docker

İf you directly modify objects in database livequery doesn’t work. Objects needs to be created/updated through parse server. Also if you are using multiple parse servers behind a load balancer you need to use redis server. Try modify/create objects with dashboard

I restarted everything and now it works! I changed the values using the dashboard. Thanks!

Hello @uzaysan ,

I met similar issues: Parse Live Query sometimes doesn’t trigger Create, Update event, while sometimes it works.

I used Parse Server version 5, one parse server on a single physical machine, with only pm2, no other load balancers. Will such situation get the same issue? Should I use redis server for it?

Great thanks!

Best regards, Jason

How many instances does PM2 running in the machine? If the answer is more than one then answer is yes. Each instance needs a way to communicate with each other. You need to use Redis.

Hi @uzaysan ,

By PM2 instances, you mean the number of CPUs managed in the PM2? The number of CPUs is 8. But actually now I have configured the redis server, still not works as expected…

Is there any way I could check the log of running status of live query along with its redis?

I also created a standalone post here:

Thanks a lot.