Sending anything over ~20 lines of code gives me an error

There seems to be a cap on how much code you can send. This is happening on ChatGPT 3.5 and 4. It´s unusable for coding at the moment.