function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sandybsandyb 

Getting Organization Administration Locked error when using the Developer Console

I have recently started using the new Developer Console quite a bit. It's a great tool, but I am experiencing an error that I have never seen before when using it: 

 

Organization Administration Locked

The changes you requested require salesforce.com to temporarily lock your organization's administration setup. However, the administration setup has already been locked by another change. Please wait for the previous action to finish, then try again later. 

 

When this happens a lock is placed on an Apex class and I cannot edit it.  Any idea how to get out of this locked state? I have tried logging out of Salesforce and logging back in again multiple times.

sandybsandyb

Ok the lock went away after about 90 minutes. But I am still wondering if something I am doing within the Developer Console might have caused it, and what I might do to avoid the issue in the future. I really like this tool, but I'm getting a bit gun shy about using it at this point.

Thomas DvornikThomas Dvornik

Hey Sandyb,

 

Do you have anything running, such as a batch job, deployment, or test runs? Those might lock a class, among other things. The only way the dev console would place a lock like that, AFAIK, would be if you ran all tests or started a bath job and it took 90 minutes to complete.

 

If that isn't the case, any other information on what you were doing between when you could edit the file and when you couldn't would help. 

 

Thomas

BBeairdBBeaird

I'm pretty certain there is a bug with the Developer Console that causes orgs to lock at random. Over the last month, I've tried switching to writing code in the developer console almost exclusively rather than Eclipse. But I've also noticed that since doing that, my org gets locked out like that for a solid 15-30 minutes at least twice a day.

 

I know it has nothing to do with batch jobs or running tests because this often happens late at night when I'm the only one logged in and the only thing I'm doing is writing code. In addition, the lock always lasts for at least 10 minutes, which should not happen even if there was some other job running.

 

But the biggest piece of evidence is this: over the last couple days, I've switched back to writing in Eclipse. Since then, I haven't had a single locking incident. This makes me sure that it's a problem with the Developer Console itself. As much as I like the instant saving, I'll be staying away from it for awhile because getting locked out like that just kills productivity.

Thomas DvornikThomas Dvornik

Thanks for the information BBeaird. Just to be clear, you are also being locked from making ALL changes to setup, including classes, etc? We will investigate the issue further. Can you provide any more detail on what you were doing when the org was locked? Were you just writting code? Setting log levels or class level filtering? Heap dumps? Are you getting the same error message? 

sdbsdb

In my case the problem always happens when I am editing an Apex class in the Developer Console. The lock then prevents me from editing or creating any new Apex classes until it clears. The problem happened again just this morning when I made a small change to an Apex controller class and attempted to save. I was not running any tests when the problem occured. Note: the Apex class that I attempted to modify is a virtual ancestor class. Not sure if it is relevant, but thought it worth mentioning.

 

Thanks!

Sandy

BBeairdBBeaird

Thomas - that's correct. While it's locked, it won't let you save a class through Eclipse, Dev Console, or by trying to edit it through the basic salesforce apex class editor in the browser. 

 

The actual error is this one: 

The changes you requested require salesforce.com to temporarily lock your organization's administration setup. However, the administration setup has already been locked by another change. Please wait for the previous action to finish, then try again later. 

 

I have verified that when this happens, there is nothing in the "Monitor Deployments" window, there are no tests running, and there are no batch jobs executing. Of course, even if there was something running, we don't have any processes, jobs, or tests that run longer than 2 minutes...certainly  nothing like the 30 minutes I'm usually getting locked out.

 

One more thing: when you get this in the Dev Console, all you get is something like "HTTP Error 500." It's not until you try and do a save in Eclipse or elsewhere that you see the above error.

sdbsdb

>>Do you have anything running, such as a batch job, deployment, or test runs?<<

 

Also, no batch jobs (we have none), no deployments, and again no tests running. Any tests that we have take no more than a minute or two to run. 

SAHG-SFDCSAHG-SFDC
I am facing this as well, I dont have any jobs running or deployments, ANy ideas how to fix this?
Prasad KasotePrasad Kasote
There is an atricle published providing information in detail:
https://help.salesforce.com/articleView?id=000004045&language=en_US&type=1