Starting today, I keep getting the error "Bad Message 431", followed by "reason: Request Header Fields Too Large" when I refresh a console page in Salesforce. The page is "https://mycompanyname.my.salesforce.com/console".

I'm using the latest version of Google Chrome. If I clear the cache, close and restart the browser, I can get to the page, but when I try to refresh the console, I keep getting this error.

Any ideas what could be happening and why this just started today?

Thank You

  • It's not completely the same, but this does sound like a similar problem to the one I described in salesforce.stackexchange.com/questions/195449/… No idea how you'd fix it, however. Opening the dev tools in your browser and inspecting the http requests to Salesforce could debunk or confirm if the general issue is the same. – Derek F Oct 14 '17 at 2:25
  • Thanks for the reply. I ended up uninstalling Chrome, reinstalling and manually recreating each one of my tabs. So far, its working fine. (fingers crossed!) – J. Schneider Oct 16 '17 at 17:48

This happened to me today (Chrome - Developer Console)

The issue was I had lots of code from previous Execute Anonymous sessions that had been commented out. As I added new lines to the top such as below, I pushed the character limit as sent via Tooling API past the max value

Lead[] leads = new list<Lead> {
    new Lead(Company = 'Foo00', LastName = 'LName00'),
    new Lead(Company = 'Foo01', LastName = 'LName01')

insert leads;

leads[0].Company = 'Foo00Changed';
leads[1].Company = 'Foo01Changed';
leads[1].Website = 'www.failme.com';  // force partial success by failing this in VR
Database.SaveResult[] results = Database.update(leads,false); // allow partial success

many lines of code previously entered for prior tests. "Many" was in the hundreds

By deleting some of those lines of commented out code, the error went away.

  • 1
    I ran into the same error today when trying to execute 154 lines of code in chrome developer console anonymous window. I tried the same in Workbench and it worked fine. – javanoob Jul 10 '18 at 17:14
  • I also use Execute Anonymous a lot in our sandbox. Usually, I use this as a place to build out code before I move it to an Apex Class. As a result, I also end up with a lot of commented out code from trials and errors. Deleting most of the commented lines (after saving them to a temporary text file) solved this issue for me. – smckitrick Feb 21 '20 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.