Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Guillaume Lhermitte
[Struts][DL] File Download through Struts action hangs a while
31. Januar 2013 06:34
Antwort

Guillaume Lhermitte

Rang: New Member

Nachrichten: 13

Eintrittsdatum: 2. November 2010

Neue Beiträge

Hi.

I am currently developping on a Liferay server.
1[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
1[$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 !
Guillaume Lhermitte
RE: [Struts][DL] File Download through Struts action hangs a while
31. Januar 2013 07:32
Antwort

Guillaume Lhermitte

Rang: New Member

Nachrichten: 13

Eintrittsdatum: 2. November 2010

Neue Beiträge

Why is this message marked as spam ?
Do I put my problem wrong ?
This is frustrating !
Amos Fong
RE: [Struts][DL] File Download through Struts action hangs a while
31. Januar 2013 11:15
Antwort

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1844

Eintrittsdatum: 7. Oktober 2008

Neue 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
Guillaume Lhermitte
RE: [Struts][DL] File Download through Struts action hangs a while
4. Februar 2013 01:28
Antwort

Guillaume Lhermitte

Rang: New Member

Nachrichten: 13

Eintrittsdatum: 2. November 2010

Neue 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 ?)
Amos Fong
RE: [Struts][DL] File Download through Struts action hangs a while
4. Februar 2013 13:01
Antwort

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1844

Eintrittsdatum: 7. Oktober 2008

Neue 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
Guillaume Lhermitte
RE: [Struts][DL] File Download through Struts action hangs a while
5. Februar 2013 08:04
Antwort

Guillaume Lhermitte

Rang: New Member

Nachrichten: 13

Eintrittsdatum: 2. November 2010

Neue Beiträge

It was related to https://issues.liferay.com/browse/LPS-29414,
I disabled gzip filter in my portal-ext.properties
1com.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 !
Amos Fong
RE: [Struts][DL] File Download through Struts action hangs a while
5. Februar 2013 10:47
Antwort

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1844

Eintrittsdatum: 7. Oktober 2008

Neue 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
Guillaume Lhermitte
RE: [Struts][DL] File Download through Struts action hangs a while
6. Februar 2013 02:12
Antwort

Guillaume Lhermitte

Rang: New Member

Nachrichten: 13

Eintrittsdatum: 2. November 2010

Neue 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 !
Amos Fong
RE: [Struts][DL] File Download through Struts action hangs a while
11. Februar 2013 14:20
Antwort

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1844

Eintrittsdatum: 7. Oktober 2008

Neue 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.