SQL Server error 1040 means you tried to set the "max outstanding I/O" value above the limit SQL Server allows for your edition and configuration. The fix is to lower the value in the server's advanced settings and restart the SQL Server service so the change takes effect. You cannot raise it past the cap; you must stay within what the edition supports.

What You'll Need

  • Administrative access to the SQL Server instance (a login in the sysadmin role, or the ability to connect as a local administrator).
  • Permission to restart the SQL Server service on the host machine.
  • SQL Server Management Studio (SSMS) or another client that can run T-SQL, such as Azure Data Studio or sqlcmd.
  • A note of the current value before you change it, so you can roll back.

Step-by-Step

  1. Confirm the error source. Error 1040 appears when you run sp_configure 'max outstanding I/O', <value> with a value SQL Server rejects. Check the full message text in SSMS or the SQL Server error log; it will state the valid range for your instance.
  2. Connect to the instance. Open SSMS, connect to the affected SQL Server instance with a sysadmin login, and open a new query window against the master database.
  3. Read the current setting. Run EXEC sp_configure 'max outstanding I/O'; and note the config_value and run_value. If the option does not appear, run EXEC sp_configure 'show advanced options', 1; RECONFIGURE; first, then repeat the read.
  4. Choose a valid value. Use a number inside the range the error message reported. If you are unsure, set it back to the default (0) so SQL Server manages it automatically, or to a modest value within the allowed range. Do not guess a number above the cap.
  5. Apply the setting. Run EXEC sp_configure 'max outstanding I/O', <valid value>; RECONFIGURE;. If RECONFIGURE itself returns error 1040, the value is still out of range; go back to step 4.
  6. Restart the SQL Server service. The setting only takes effect after a service restart. In SQL Server Configuration Manager, open SQL Server Services, right-click the SQL Server (INSTANCE) service, and choose Restart. On Linux, use systemctl restart mssql-server. Plan a maintenance window: restarting disconnects users and rolls back in-flight transactions.
  7. Verify. Reconnect and run EXEC sp_configure 'max outstanding I/O'; again. The run_value should now match the config_value and no longer trigger error 1040.

Common Mistakes

  • Assuming the error is a performance problem. Error 1040 here is a configuration validation error, not a sign that the server is overloaded.
  • Setting a value above the documented cap. The allowed range depends on the edition and version; the error message states it. Raising it further will keep failing.
  • Forgetting RECONFIGURE. Changing the value without running RECONFIGURE leaves the setting unapplied.
  • Skipping the restart. config_value changes but run_value does not until the service restarts.
  • Changing it on a production server without a window. Restarting drops connections and can roll back open transactions.

Tips

  • Record the previous value and the exact command you ran, so you can revert quickly if performance changes.
  • Test the new value on a non-production copy of the instance first.
  • If the option was never tuned, leaving it at the default (0) is usually the safest choice; SQL Server then manages outstanding I/O itself.
  • Check the SQL Server error log after the restart for any related warnings.

Troubleshooting

Error 1040 returns after RECONFIGURE. The value is still outside the allowed range. Re-read the full error text and pick a number inside it, or reset to 0.

The setting does not appear in sp_configure. Advanced options are hidden. Enable them with sp_configure 'show advanced options', 1; RECONFIGURE; and try again.

run_value still shows the old number after restart. Confirm the service actually restarted (check the service state in Configuration Manager) and that you connected to the same instance you configured.

You cannot connect to run the commands. Start the instance in minimal configuration mode (sqlservr.exe -m from an elevated command prompt, or the equivalent startup parameter) to allow a single administrator connection, make the change, then restart normally.

Performance changed after the edit. Revert to the previous value or to 0, run RECONFIGURE, and restart during a maintenance window.

Frequently Asked Questions

What does max outstanding I/O actually control?

It caps how many asynchronous I/O requests SQL Server can have outstanding at once. The default of 0 lets SQL Server manage the value automatically.

Can I just set it to a very high number?

No. Each edition and version has an upper limit, and going past it produces error 1040. The error message tells you the valid range.

Does the change require a restart?

Yes. RECONFIGURE updates the configured value, but the running value only changes after the SQL Server service restarts.

Will this error damage my database?

No. It is a rejected configuration change, so nothing is written. The risk comes from restarting the service at a busy time, not from the error itself.

Is error 1040 always about max outstanding I/O?

No. SQL Server uses error numbers for many conditions. Read the full message text to confirm which setting or resource is involved before changing anything.

Should I tune this setting at all?

Most instances run fine at the default. Only change it if you have a specific, verified reason, and test on a copy first.