KevinBatdorf / code-block-pro

A Gutenberg code block with syntax highlighting powered by VS Code
https://code-block-pro.com
132 stars 10 forks source link

When there are many blocks or the code is lengthy, it displays 'The response is not a valid JSON response' #293

Open holizero opened 9 months ago

holizero commented 9 months ago

When there are many blocks or the code is lengthy, upon saving a post, it displays 'The response is not a valid JSON response.' Is this a memory issue with WordPress? It's disappointing.

KevinBatdorf commented 9 months ago

I haven't seen that before and have seen some long posts. How long is the post?

Do you know how to check what the server response is from the Network tab in the browser's dev tools?

holizero commented 9 months ago

Hi, when I look at the developer tools, I see the phrase 502 Bad Gateway.

Is this what you want?

holizero commented 9 months ago

My nationality is Korean, but when I looked at the network tab I mentioned, I saw a response message from the hosting company.

First, I contacted the hosting company. Thanks for the reply :)

KevinBatdorf commented 9 months ago

Ah ok. Yeah maybe the host firewall. Well, after you hear back let me know if I can help some how.

holizero commented 9 months ago

Hello. I asked the server administrator (hosting provider), and they said that if you input and save more than 4000 bytes of information into this plugin, Apache will shut down abnormally. Could you please test it out for me?

KevinBatdorf commented 9 months ago

Apache should be able to take a 2GB payload. 4kb is tiny.

What if you remove some of the code? Does it work fine? For example, remove 50% of the lines

Do you have Hangul characters in there? If yes, can you try removing those and see if there's a difference?

Can you share the code you're using? Maybe it's something else

You can paste it here and keep it secret if you need to.

https://gist.github.com/