Wappler Created Me a 465Mb Server Action!

Was it some complex Server Action? Can you share a screenshot of the structure in Server Connect?

1 Like

Having just found the backup, I can now see the small differences that maybe caused the problem… it could be to do with me putting variables inside the repeat statements…

Here is the screenshot of the working backup from Monday evening:

1 Like

I’ll PM @patrick the working file to play with…

1 Like

Reminds me of the London tube station map!

:smiley:

7 Likes

I guess “switch case” is necessary to be more understandable when using server connect. :slight_smile:

4 Likes

That’s just what I was thinking looking at the action steps. Switch or elseif (hopefully both) - this is a great example of why these options are really needed.

2 Likes

Sorry to resurrect such an old thread, but I think that this is actually a pretty major bug.

I just had an issue where Wappler was taking a long time to save one of my Server Actions, and eventually it started crashing. When I checked the size of the file, it was over 400 MB! I managed to load the file in Sublime Text, and there were millions of nested “sub” arrays.

I had to recreate the Server Action from scratch, but I’ve noticed that the file size is increasing exponentially every time I save it - even if I don’t change anything! It looks like Wappler is duplicating these “sub” arrays each time.

@George - Can someone take a look at this, please?

well this happens when you have a loop in your data expressions, like creating a loop through a expression and inside loop through the same loop or accidently use the same name.

Usually this is easily solved by just deleting the effected steps - ones that has many records with output.
Actually you can see which steps are problematic - as those have the many output records on them.

@George , I still don’t understand your explanation of what you think causes this situation… either when you explained it to me before or in reading your words here.

Can you give an example of what you mean please?

I’d really like to understand this as you seem to be saying it is a user error rather than a Wappler bug.

Thanks!
Antony.

Thank you for your fast response, @George.

The expression in the offending repeat step looks like this - “getUserExercises.data.query2.where(‘category_top’, ‘==’, $value)”. However, the same thing happens if I change the expression to a number.

If I stop this repeat step from outputting, the file returns to a normal size after a few saves, but this obviously stops the data inside the step from outputting too, so that’s not a solution.

When I set the repeat step to output, the Server Action works as expected, so the only issue is the fact that Wappler is duplicating the data whenever the file is saved.

If you’re using $value does that mean that this expression sits inside another repeat? If so, what’s the expression on that one?

If the previous repeat is happening too many times because of an error/mistake, it may be that part that’s the problem but only shows when this one is set to output…

Yeah, here’s the expression - “userDetail.focus.split(’,’)”. However, it also happens if I change that expression to “1”, or any other number.

This has got to be a bug, right? The Server Action works perfectly, but even if I’d made a mistake, it shouldn’t be silently duplicating data every time the file is saved - especially if the file hasn’t been changed at all…

1 Like

I am also getting this same issue and I am unsure if this is user error.

@George It seems to be when the Server Action is saved.