Foren

[Struts][DL] File Download through Struts action hangs a while

thumbnail
Guillaume Lhermitte, geändert vor 11 Jahren.

[Struts][DL] File Download through Struts action hangs a while

New Member Beiträge: 13 Beitrittsdatum: 02.11.10 Neueste Beiträge
Hi.

I am currently developping on a Liferay server.
[liferay-portal-6.1.10-ee-ga1 + tomcat-7.0.25]


In some cases my users download files from the Document-Library.

What happens is that when they do so with the following type of url
[$LIFERAY_HOST]/c/document_library/get_file?uuid=[$OBNOXIOUSLY_LONG_UUID]&groupId=[$MY_GROUP_ID]


The file download takes ages to end.
In fact the download itself does not take more time than required. But it seems that the response is not closed.
Most download clients (including firefox, wget, wireshark) don't seem to be noticed of the end of the response.
Result is that they hang for no actual good reason.
Worst is that my firefox users have the impression that their download is taking ages for files that are really small (like 20 seconds for 8kb ... thay say, and are right, it is unacceptable).


I've tried to dig in my stacks and look around in liferay's sources but I can't figure where that latency comes from.
I've tried to look in the way of this thread (which looked really promising) https://www.liferay.com/community/forums/-/message_boards/message/11838689
-> But this did not apply to my problem. I've forced all filter classes to spit log messages and they all seem to execute in a few milliseconds (at most, one second all together).

I tried to inspect httpservletrequest's outputstream flushing and closing, they are all executed rightfully and cleanly ... I'm starting to loose hope and faith in myself ... I'm sad, I feel dirty, I need coffee ... Help me ... please !
thumbnail
Guillaume Lhermitte, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

New Member Beiträge: 13 Beitrittsdatum: 02.11.10 Neueste Beiträge
Why is this message marked as spam ?
Do I put my problem wrong ?
This is frustrating !
thumbnail
Amos Fong, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
Guillaume Lhermitte:
Why is this message marked as spam ?
Do I put my problem wrong ?
This is frustrating !


See this thread https://www.liferay.com/community/forums/-/message_boards/message/17827380
thumbnail
Guillaume Lhermitte, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

New Member Beiträge: 13 Beitrittsdatum: 02.11.10 Neueste Beiträge
Thanks for the explanation ;)

And about my actual question, have you any idea ? Any clue on what might cause my problem ?

Any question on my situation (some details I missed to add in my question ?)
thumbnail
Amos Fong, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while (Antwort)

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
Hm...regarding your actual issue, it might be this issue:
https://issues.liferay.com/browse/LPS-29323
https://issues.liferay.com/browse/LPS-29414
thumbnail
Guillaume Lhermitte, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

New Member Beiträge: 13 Beitrittsdatum: 02.11.10 Neueste Beiträge
It was related to https://issues.liferay.com/browse/LPS-29414,
I disabled gzip filter in my portal-ext.properties
com.liferay.portal.servlet.filters.gzip.GZipFilter=false
.

Can you let me know if there is a better way to do it (like overriding my servlet filter bean definition in liferay-web.xml) ?

Anyway, thanks !
thumbnail
Amos Fong, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
Yea, check out the actual fix in this pull request and apply it yourself:
https://github.com/hhuijser/liferay-portal/pull/833/files
thumbnail
Guillaume Lhermitte, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

New Member Beiträge: 13 Beitrittsdatum: 02.11.10 Neueste Beiträge
This implies modifying the shipped server.
Isn't there a way to fix it through a hook or an ext ?

Moreover, this is a workaround more than an actual fix as far as I understand it.
This stops Liferay from using it's GZip compression on certain urls more than fixing the actual hanging problem of the GZip filter.
I am no sure I am right on that last statement ...
If I am wrong, may you explain what I am missing ?

Thanks !
thumbnail
Amos Fong, geändert vor 11 Jahren.

RE: [Struts][DL] File Download through Struts action hangs a while

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
I'm not 100% sure but I don't think you can do with ext cause it merges the web.xml so I don't think it will overwrite the definition and might even cause an error.

I think Gzip filter shouldn't be applied to document library cause most of time the files are already in a format that's already compressed (ie zip, pdf, images, etc.). I'm not sure if that was the exact reasoning but it makes sense to me.