Strange problem with Server connect. Number of connects increases

I have a strange problem with server connect.
I am rerouting one page "Products" to another page "Booking" But when I click on products the first time the server connect triggers one time. the next time I clik on a product the server connect triggers 2 times and it is increasing every time I click on a product. Until I refresh the "product" page then it starts on 1 again.

Any idea

How are you calling the server action? What server model are you using and what page is that?

I use nodejs and and the server action is an auto load. I put a variable with the data I want the page to get. And checking if I get any data from the server action. If I don't get any data it is going back to the first page. It is possible to test this webpage.

Can you send a link to your page, where we can check this?

Is there a possibility during page load and after, the variable to change values (initialized) and forcing the serverconnect to reload?

Put the variable declaration in the success event of the server connect to ensure it is declared after data load.

Guys, I'm having the same problem in all my app!! I don't know how to replicate!

Please, watch this loom and look the qty of requests on dev tools! Im ordering by name to better visualization.
It is not breaking the app, but it get slow each time the server connects are loaded.

This app has almost 3 years and I never see this happen. Looks like it started when I upgraded node.js to v18 (I guess).

I'm using docker (created via Docker Machine 1 year ago), postgresSQL (Digital Ocean cluster), node.js and Wappler 6.7.0

I've open one topic about this problem couple of weeks ago:

The variable is set in "produkt/product" webpage an after that the "Bestilling/order" web page is startet with browser goto. Then the auto load of the server connect is runnnig. So I don't think that it wil help.

This seems like the same problem. And the problem has not been there before. I am not sure wich version of wappler it suddenly appeard.

1 Like

@patrick @Teodor @George any tip?

Please provide the exact steps to reproduce this. Looking at videos with some clicking around doesn’t really make it clear for us what happens.

@teodor I think it's enough to know that's something wrong with app connect 2, it was not happening with the deprecated AC version.

Reposting, again, the topic:

Here is an example.
first page selecting a product. This selection is starting the next page with browser goto internal. And save a variable for the autoload of an server connect that starts a simple query to select some data. then you go back to the previous page. And select a product again

The first time I do this it starts the serverconnect 1 time everytime I go back to the starting page an select a new product or the same product it triggers the server connect one time more.

So first select 1 time server connect
Second select 2 times server connect
Third select 3 time server connect
and so on.

"Removed" is a test place so you kan se.
First you choose select
image

Then you select
image

Then you can try one of those tree cards

Then go back and try one of the other cards
the second page is just starting a simple serverconnect as autoload.
If you refresh the page it starts on 1 again.

1 Like

@tehowden I replicated the issue, checking DevTools!

As an aside, add class h-100 to those cards will make them same size. (Sorry OCD kicking in :grinning:)

4 Likes

Where is the serverconnect component located and how is it triggered. Is it on the main layout page or some partial that is being reloaded each time and is it triggered using an event or on load?

It is not in the main layout it is put in the booking page and is a "auto run" server connect. The variable I use is in the main layout. There is nothing else tatt trigger this server connect. That is, I don't call this server connect anywhere else.

Tor, as nobody else is reporting this,we must assume there is probably an issue with how it is coded.

Perhaps we could see your code for:

  1. Defining the variable in the layout.
  2. Any code/events which change this value
  3. How you call the server connect.
  4. Any other code directly related to the management of the variable or server action

That will allow a more informed response.

I have no problem with that. But I have changed the code for this site several time since I got that problem. Now that special problem is gone. I had a toggel that was preventing it to happen and when I removed this toogle to test it again, the problem has wanished. :flushed: I am deeply sorry by this. I do not know what was happening but it seems like a problem with my code someplace.