# Preparations
# in IDE:
* open the `/index.php` for editing
* replace `$application->Run();` line with `echo $application->NextResourceId();` line
* save changes
* open the `/system/config.php` file for editing
* append this to end of the file:
```
lang=php
$_CONFIG['Databases'] = array(
array(
'DBHost' => $_CONFIG['Database']['DBHost'],
'DBUser' => $_CONFIG['Database']['DBUser'],
'DBUserPassword' => $_CONFIG['Database']['DBUserPassword'],
'DBLoad' => 1,
'DBMaxLag' => 15,
),
);
```
* save changes
# Part 1
# don't apply the patch
# open `/index.php` in the browser
# confirm, that it hangs (page keeps loading) because lock was set in slave database, but data is changed in master database (they both reference the same database)
# apply the patch
# open `/index.php` in the browser
# confirm, that page has loaded and next resource id is displayed on the page
# open `/index.php` in the browser
# confirm, that page has loaded and next resource id is displayed on the page (not the same as previous time)