- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
02-07-2011 01:42 PM
I am onsite at a client teaching them about the wonderful ways of salesforce development and have run into an issue when they try to "Run All Tests" within the browser.
First it seemed like it was working normally, there are quite a few unit tests in the org, so it is expected to take about 10 minutes to run to completion. However, an hour rolled around and it still claimed to be "Running Tests...". I had them close their browser and try again, and now they are presented with the "Organization Administration Locked" message.
So I tried my self to run these tests, thinking there is no way that the server is still executing unit tests, and low and behold 7 minutes later I have run all tests to completion. So I had them try to run all tests again and they are still being shown an "Organization Administration Locked" message.
I am on a Mac, they are on PCs. I am using Chrome, they are using IE7. I don't think either of these things are the cause of the issue. However, they are on a pretty locked down network while I am using a hotspot, but I would have assumed that if you could login to the org from their browser, that they would be able to run all tests from their browser. Do I need them to setup proxy settings in their browser or something? Has anyone else ever run into this? Maybe its an issue with the new release?
In any event I will log a case with salesforce if I cant get this issue resolved by noon MST tomorrow.
03-09-2011 09:34 AM
No resolution found...as a work around I have them running tests from Eclipse.
Logged a case with salesforce a couple days after I posted this and still have not heard back.
03-09-2011 09:42 AM
I was in an Organization Administration Locked state after I did a Run All Tests last night and this morning the tests had not completed. I closed the browser, logged in again and got the locked error. It cleared itself after 1/2 hour but I still don't know what happened.
07-11-2011 02:41 PM
To find out what action triggered the organization lock, users can check the "Setup Audit Trail" to view recent actions that meet the criteria outlined above.
Administrators attempting to make changes to sharing setup or custom field/object setup may receive an "Org Administration Locked" message. This occurs when a similar setup change that affects a large number of records is still being processed.
In order to maintain data integrity, the relevant setup area is locked until the change is complete. Sharing changes will only lock sharing setup and custom field/object changes will only lock custom field/object setup.
Examples of scenarios that trigger this message if simultaneous setup changes are attempted:
- Changes to the Role Hierarchy
- Changes to the Sharing Model
- Mass reassignment of Account/Sales Teams
- Role create/edit/change
- Territory create/edit/change
- User create/edit/change
- Any create/update/delete of custom fields or custom objects, including replacing picklist values or simple changes such as editing a custom object description.
Please note that this is not an error message. This functionality is by design and is in place to ensure data integrity. If you receive this message while attempting to make a setup change, please wait a few minutes and try again. As soon as the process that triggered the lock completes, the relevant setup area will be unlocked.
1. Admin changes from the UI can create an Org Lock
2. ANT deployments can create an Org Lock
3. A Terminated ANT deployment, does not imply the process is terminated immediately on the server, hence an org lock continues
4. A Timeout ANT deployment just means that the ANT(client) side timeout waiting for the process to complete, does not imply the process is terminated immediately on the server, hence an org lock continues until complete or recovered. To avoid this you may need to adjust the timings in your build.xml file.
5. A heap error could occur with ANT during deployment, this also does not imply the process is terminated immediately on the server, hence an org lock continues until complete or recovered. To avoid this you may need to adjust Java/ANT heap setting in your environment
6. Simultaneous ANT deployments by different individuals can be blocked out due to org locks
Change management, change control and scheduling procedures are essential when making administrative changes as a team.
An Org lock is created to protect the Org from data and metadata integrity issues.There are NO options to remove/delete the org lock.
The duration of the Org lock varies based on the Administrative activity in progress, and is not measurable. The duration depends on multiple factors, object/feature, security controls, table sizes, essentially scope and impact of the changes in progress.
Logging a case with Salesforce support for an Org lock is not necessary, unless the lock exceeds 3hrs or is significantly impacting a critical project. When logging a case, please include the Org with the problem, username with the problem, Logs including Salesforce debug logs & ANT logs, and most importantly the ANT package that caused the problem, and lastly the Setup audit Trail.
02-29-2012 10:23 AM
I've encountered a similar issue with the Organisation lock after running the test cases. Documented here: Salesforce stuck in Organization Administration Locked state after using Apex Test Execution.
I'm still working with the Salesforce Developer Support Team to try and resolve it.
02-29-2012 10:27 AM
The Organization Lock error will be given to you till the time the Active Request for the deployment will be running in the background for the previous request, i.e. in your case, running the Test methods.
02-29-2012 10:37 AM
It makes sense that the Organization would be locked for the duration of the test execution but in my case the test methods are hanging and the Organization Lock isn't clearing (at least not within 12 hours). I'm unable to abort the test process through aborting the
ApexTestQueueItem or AsyncApexJob.
This renders the Org unusable for further deveolpment as I can't update the Apex Classes or run any test methods.