[Help] Refresher causes Tomcat response slow

Hi,

I use Tomcat 6.0.23, Java 6, Vaadin 6.8.4, and Refresher 1.1.1.
If I use Refresher default refresh time (1 second, I think), it will cause tomcat response slow and AJAX loading icon turns to red color.
I need to set refresh time to 30 seconds, then tomcat will work normal, but 30 seconds are too long for user to see latest data on web page.
Do you have any comment or advice to solve such issue?

Thank you for any help!

Not seen that problem…

Are you making big changes in the vaadin components which needs to be pushed every time ?

No, my vaadin web page is updated once a day.
The busy loading happens when more than two clients view web page.
So i have to increase refresh time to avoid busy loading.

Each client has his own refresh component, is this a problem?

Thank you.

No,

you must have a component for each application instance

Could it be that you have some code where there is some kind of exclusive section?
For me it look slike there is some locking occuring, preventing the other instance of the application to access the needed resources.

BTW: The load is not a problem on the server, or is it ?

I put refresher back to application instance with default 1 second timer.
But same problem, when open two browsers for same web page, the AJAX loading indicators of two browsers are showed and turned into white → yellow → red color continuously, like the attachment.
And the response time is getting slow if I open third or more browser.
The unix server doesn’t have loading problem, it’s development server, only developer will use it.

Any advice would be appreciated.
12586.png

My web page is pretty simple.
Just six tabs on tabsheet, some pictures, and wait for user to click tab.
No writing, just reading pictures.
After the whole web page is ready for client/user, no any access in the background.

When you pout ?debug at the end of the URL you should see what takes how much time

I would do it once with the refresher activate and once without.
So you will see where the problem is comming from

Hi, thanks for advice.
The debug log as below with one client access:


Server visit took 24ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 18ms
JSON parsing took 0ms
Response:
 Processing time was 4ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 14ms
JSON parsing took 0ms
Response:
 Processing time was 2ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 18ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 15ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 24ms
JSON parsing took 1ms
Response:
 Processing time was 2ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 15ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 15ms
JSON parsing took 0ms
Response:
 Processing time was 2ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 14ms
JSON parsing took 0ms
Response:
 Processing time was 2ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 13ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri

The time of “Server visit took” looks good!
After opened second client. “Server visit took” is getting slow, log as below:


Server visit took 18ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 6612ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 3377ms
JSON parsing took 0ms
Response:
 Processing time was 0ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 2824ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 19ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 16ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 1784ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 2664ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 2942ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
New window width: 1400
New window height: 937
Running layout functions due to window or parent resize
Server visit took 1458ms
JSON parsing took 0ms
Response:
 Processing time was 1ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 1637ms
JSON parsing took 0ms
Response:
 Processing time was 15ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 1799ms
JSON parsing took 0ms
Response:
 Processing time was 13ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 3076ms
JSON parsing took 0ms
Response:
 Processing time was 17ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 83ms
JSON parsing took 0ms
Response:
 Processing time was 14ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 2622ms
JSON parsing took 0ms
Response:
 Processing time was 16ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 2306ms
JSON parsing took 0ms
Response:
 Processing time was 6ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri
Server visit took 1600ms
JSON parsing took 0ms
Response:
 Processing time was 15ms for 80 characters of JSON
Referenced paintables: 17
Variable burst to be sent to server:
	PID352 (class com.github.wolfie.refresher.client.ui.VRefresher) :
		r (i) : 0
Making UIDL Request with params: 31f42dc4-4833-4c71-a8be-da1024b175430PID352ri

Does it mean the problem is Tomcat?

Hi, I took a look at server status of Tomcat manager, like the attachment.
The architecture is Client ↔ Apache HTTP server ↔ Tomcat server
Does it tell me the bottle neck is Apache HTTP server or anything?
12588.png