Re: PDF rendering in background blocks other requests

2018-03-18 Thread Ilya Obshadko
Yes, I’ve already found the root cause (described in my previous message). Setting tapestry.session-locking-enabled=false instantly fixes this. However, long-term, I’d prefer to have something like this (pseudocode): lock.safeGet(() -> session.getAttribute(name)); lock.safeSet(() -> session.setAt

Re: PDF rendering in background blocks other requests

2018-03-18 Thread Ilya Obshadko
UPD: after spending some time debugging I found the place where it’s actually blocking. It’s TapestrySessionFactoryImpl.acquireWriteLock() method and, specifically, this part: lock.writeLock().lock(); perthreadManager.addThreadCleanupCallback(new Runnable() { public void run() {

Re: PDF rendering in background blocks other requests

2018-03-18 Thread Dmitry Gusev
Take a thread dump and see what other blocked requests are waiting for? On Sunday, March 18, 2018, Ilya Obshadko wrote: > Hi everyone, > > I’m struggling to understand the cause of the following issue: > > - my Tapestry application generates certain PDF files using Apache FOP and > Saxon > - whe

PDF rendering in background blocks other requests

2018-03-18 Thread Ilya Obshadko
Hi everyone, I’m struggling to understand the cause of the following issue: - my Tapestry application generates certain PDF files using Apache FOP and Saxon - when PDF generator process is started, other requests to that instance are blocked until it’s finished - moving FOP processing to a new th