Sometimes the publishing of ITS templates fails and the changes are not visible. This might be due to an erroneous lock situtation.
This article describes how to solve this in the ITS above WebAS 6.40.
Publishing Business HTML templates
Publishing Business HTML templates, what does this mean? Publishing a template takes two steps:
- Switch the template into an active mode
- Invalidate the template cache
Sometimes the publishing of ITS templates fails with the message:
Publishing: changes in templates are not performed or are not visible.
This means that the template changes have been submitted to the database but the template caches could not be updated yet. If this happens after a repeated publishing we assume a lock situation with the current system. The template interpreter (sapjulep) operates on the cached (preparsed) templates and therefor it sets a read lock during the access of a cache slot. If a work process aborts during the processing of a template it cannot - of course - remove the read lock. This has never been observed in productive systems but may occur in development environments.
With a read lock set, the publishing process cannot retrieve a write lock and therefor the cache stays at a state 'not up to date'. This can be seen in the screen 'Mutex Locks' of the transaction 'SITSPMON'. Usually it is very unlikely to see a template read/write mutex lock, but in those situations you will see entries consisting of the work process holding the lock, the slot number and the mode of the lock (read/write).
Using the transaction 'SM50' we can restart the work processes holding a lock. During it's start up the work process will remove locks set by the work process' predecessor. This is a good idea since the lock must be invalid. After restarting every work process holding such a read lock the invalidating of the template cache should work again.
But please do not forget to check the trace file of the work process for hints to the kind of error which lead to that lock situation.