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.
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.
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.
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
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.
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.
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. I am deeply sorry by this. I do not know what was happening but it seems like a problem with my code someplace.