Webcore memory at 95% when saving a piston


#1

As the title says I have a piston (holiday lights) that is causing webcores memory to shoot up to 95 %. I know this because when I try to edit the piston and look in the classic app at webcore it goes from 45 to 83 to 95 and then the piston is website fails to save. I am then greeted with the Sorry, an error occurred while retrieving the piston data warning in webcore and something when wrong click here to go home.

(Placeholder for piston image)

( 0547d58a-7938-40c5-809b-5387495cf6ba 8:27:04 PM: error physicalgraph.exception.StateCharacterLimitExceededException: State cannot be greater than 100000.0 characters)


#2

Pistons have a size limit of 100 KB…
(this includes the code and any logs attached)

On a PC, if you see it counting the “Chunks” when you try to save, and it stalls on a number between 17 & 23, then it’s likely your piston is too large. It’s probably time to clean up the code, or split it into multiple pistons to conserve space a bit.


You may be able to PINCH a tiny bit extra space if you turn logging OFF before trying to edit.
(but this only helps a little bit)


#3

Having to clear the data cache suggests that it is failing to save all the chunks in order to create/update the piston. Those chunks are first saved to the webCoRE smart app, then written out to a piston once all have been received.

The size of piston that you are able to create is limited by the amount of data in use by the webCoRE smart app rather than the total amount of code in the piston exceeding 10K. Memory in the webCoRE smart app is also used to store the names, state, and tiles for all your pistons.

Your best bet is to delete pistons that are unused, particularly if they use tiles or display text in the piston state. The size of the piston code here does not matter, just the metadata. With fewer pistons and less metadata tracked in the webCoRE app you will be able to save larger pistons like the one just is giving you trouble in the OP.


#4

I broke it into two pistons and that worked. Thanks both of you for the info