Discussion:
[Dspace-tech] DSpace 5.3 and Google Analytics
Sean Carte
2015-08-21 11:15:08 UTC
Permalink
When I download an item from my repository I have to wait for
google-analytics to respond. When the network gets busy this causes delays
and even time-outs.

I've tested this with a fresh install of DSpace 5.3, in which I only
modified the build.properties file up to the db.password; everything else
was left at its default value. The tcpdump below shows the two minute delay
before google-analytics responds, after which the download could proceed.

For the sake of comparison, I installed 4.3; google-analytics is not
contacted and there is no delay in the download.

Is there some way that I can prevent DSpace from attempting to contact
google-analytics?

I'm using the default Mirage theme on the XML UI, Ubuntu Linux 14.04,
Tomcat 7, Postgresql 9.3, and OpenJDK 1.7.

Sean

***@dspace:~# tcpdump -n host www.google-analytics.com
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:15:51.363910 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 942932 ecr
0,nop,wscale 7], length 0
12:15:52.362277 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 943182 ecr
0,nop,wscale 7], length 0
12:15:54.366296 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 943683 ecr
0,nop,wscale 7], length 0
12:15:58.370273 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 944684 ecr
0,nop,wscale 7], length 0
12:16:06.386278 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 946688 ecr
0,nop,wscale 7], length 0
12:16:22.418299 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 950696 ecr
0,nop,wscale 7], length 0
12:16:54.514324 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 958720 ecr
0,nop,wscale 7], length 0
12:17:58.644247 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [S], seq
724705332, win 29200, options [mss 1460,sackOK,TS val 974752 ecr
0,nop,wscale 7], length 0
12:17:59.642304 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [S], seq
724705332, win 29200, options [mss 1460,sackOK,TS val 975002 ecr
0,nop,wscale 7], length 0
12:17:59.642784 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [S.], seq
233810580, ack 724705333, win 5792, options [mss 1460,sackOK,TS val
122173388 ecr 975002,nop,wscale 1], length 0
12:17:59.642810 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack 1,
win 229, options [nop,nop,TS val 975002 ecr 122173388], length 0
12:17:59.648659 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
1:190, ack 1, win 229, options [nop,nop,TS val 975003 ecr 122173388],
length 189
*12:17:59.649431 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
190, win 3216, options [nop,nop,TS val 122173389 ecr 975003], length 0*
12:17:59.674287 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], seq
1:1449, ack 190, win 3216, options [nop,nop,TS val 122173391 ecr 975003],
length 1448
12:17:59.674318 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
1449, win 251, options [nop,nop,TS val 975010 ecr 122173391], length 0
12:17:59.674431 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
1449:3714, ack 190, win 3216, options [nop,nop,TS val 122173391 ecr
975003], length 2265
12:17:59.674477 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
3714, win 287, options [nop,nop,TS val 975010 ecr 122173391], length 0
12:17:59.697414 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
190:265, ack 3714, win 287, options [nop,nop,TS val 975015 ecr 122173391],
length 75
12:17:59.699948 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
265:271, ack 3714, win 287, options [nop,nop,TS val 975016 ecr 122173391],
length 6
12:17:59.700195 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
271:312, ack 3714, win 287, options [nop,nop,TS val 975016 ecr 122173391],
length 41
12:17:59.710312 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
271:312, ack 3714, win 287, options [nop,nop,TS val 975019 ecr 122173391],
length 41
12:17:59.710687 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
312, win 3216, options [nop,nop,TS val 122173395 ecr 975015,nop,nop,sack 1
{271:312}], length 0
12:17:59.767167 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
3714:3761, ack 312, win 3216, options [nop,nop,TS val 122173401 ecr
975015], length 47
12:17:59.768435 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
312:721, ack 3761, win 287, options [nop,nop,TS val 975033 ecr 122173401],
length 409
12:17:59.768911 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
721, win 3752, options [nop,nop,TS val 122173401 ecr 975033], length 0
12:17:59.950387 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
3761:4254, ack 721, win 3752, options [nop,nop,TS val 122173419 ecr
975033], length 493
12:17:59.950861 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
721:748, ack 4254, win 309, options [nop,nop,TS val 975079 ecr 122173419],
length 27
12:17:59.950935 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [F.], seq
748, ack 4254, win 309, options [nop,nop,TS val 975079 ecr 122173419],
length 0
12:17:59.951670 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
748, win 3752, options [nop,nop,TS val 122173419 ecr 975079], length 0
12:17:59.951683 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
749, win 3752, options [nop,nop,TS val 122173419 ecr 975079], length 0
12:17:59.951908 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [F.], seq
4254, ack 749, win 3752, options [nop,nop,TS val 122173419 ecr 975079],
length 0
12:17:59.951927 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
4255, win 309, options [nop,nop,TS val 975079 ecr 122173419], length 0
^C
--
Hilton Gibson
2015-08-21 11:21:12 UTC
Permalink
Hi Sean,

We are using DSpace 5.3 in production now.
See: http://scholar.sun.ac.za
Our downloads work fine, perhaps your campus gateway/firewall is to blame?

Cheers

hg

*Hilton Gibson*
Ubuntu Linux Systems Administrator
Stellenbosch University Library
http://staff.lib.sun.ac.za/~hgibson/docs/cv/cv.html
Post by Sean Carte
When I download an item from my repository I have to wait for
google-analytics to respond. When the network gets busy this causes delays
and even time-outs.
I've tested this with a fresh install of DSpace 5.3, in which I only
modified the build.properties file up to the db.password; everything else
was left at its default value. The tcpdump below shows the two minute delay
before google-analytics responds, after which the download could proceed.
For the sake of comparison, I installed 4.3; google-analytics is not
contacted and there is no delay in the download.
Is there some way that I can prevent DSpace from attempting to contact
google-analytics?
I'm using the default Mirage theme on the XML UI, Ubuntu Linux 14.04,
Tomcat 7, Postgresql 9.3, and OpenJDK 1.7.
Sean
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:15:51.363910 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 942932 ecr
0,nop,wscale 7], length 0
12:15:52.362277 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 943182 ecr
0,nop,wscale 7], length 0
12:15:54.366296 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 943683 ecr
0,nop,wscale 7], length 0
12:15:58.370273 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 944684 ecr
0,nop,wscale 7], length 0
12:16:06.386278 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 946688 ecr
0,nop,wscale 7], length 0
12:16:22.418299 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 950696 ecr
0,nop,wscale 7], length 0
12:16:54.514324 IP 10.4.36.12.45650 > 216.58.223.14.443: Flags [S], seq
825965849, win 29200, options [mss 1460,sackOK,TS val 958720 ecr
0,nop,wscale 7], length 0
12:17:58.644247 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [S], seq
724705332, win 29200, options [mss 1460,sackOK,TS val 974752 ecr
0,nop,wscale 7], length 0
12:17:59.642304 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [S], seq
724705332, win 29200, options [mss 1460,sackOK,TS val 975002 ecr
0,nop,wscale 7], length 0
12:17:59.642784 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [S.], seq
233810580, ack 724705333, win 5792, options [mss 1460,sackOK,TS val
122173388 ecr 975002,nop,wscale 1], length 0
12:17:59.642810 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack 1,
win 229, options [nop,nop,TS val 975002 ecr 122173388], length 0
12:17:59.648659 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
1:190, ack 1, win 229, options [nop,nop,TS val 975003 ecr 122173388],
length 189
*12:17:59.649431 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
190, win 3216, options [nop,nop,TS val 122173389 ecr 975003], length 0*
12:17:59.674287 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], seq
1:1449, ack 190, win 3216, options [nop,nop,TS val 122173391 ecr 975003],
length 1448
12:17:59.674318 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
1449, win 251, options [nop,nop,TS val 975010 ecr 122173391], length 0
12:17:59.674431 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
1449:3714, ack 190, win 3216, options [nop,nop,TS val 122173391 ecr
975003], length 2265
12:17:59.674477 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
3714, win 287, options [nop,nop,TS val 975010 ecr 122173391], length 0
12:17:59.697414 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
190:265, ack 3714, win 287, options [nop,nop,TS val 975015 ecr 122173391],
length 75
12:17:59.699948 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
265:271, ack 3714, win 287, options [nop,nop,TS val 975016 ecr 122173391],
length 6
12:17:59.700195 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
271:312, ack 3714, win 287, options [nop,nop,TS val 975016 ecr 122173391],
length 41
12:17:59.710312 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
271:312, ack 3714, win 287, options [nop,nop,TS val 975019 ecr 122173391],
length 41
12:17:59.710687 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
312, win 3216, options [nop,nop,TS val 122173395 ecr 975015,nop,nop,sack 1
{271:312}], length 0
12:17:59.767167 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
3714:3761, ack 312, win 3216, options [nop,nop,TS val 122173401 ecr
975015], length 47
12:17:59.768435 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
312:721, ack 3761, win 287, options [nop,nop,TS val 975033 ecr 122173401],
length 409
12:17:59.768911 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
721, win 3752, options [nop,nop,TS val 122173401 ecr 975033], length 0
12:17:59.950387 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [P.], seq
3761:4254, ack 721, win 3752, options [nop,nop,TS val 122173419 ecr
975033], length 493
12:17:59.950861 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [P.], seq
721:748, ack 4254, win 309, options [nop,nop,TS val 975079 ecr 122173419],
length 27
12:17:59.950935 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [F.], seq
748, ack 4254, win 309, options [nop,nop,TS val 975079 ecr 122173419],
length 0
12:17:59.951670 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
748, win 3752, options [nop,nop,TS val 122173419 ecr 975079], length 0
12:17:59.951683 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [.], ack
749, win 3752, options [nop,nop,TS val 122173419 ecr 975079], length 0
12:17:59.951908 IP 216.58.223.14.443 > 10.4.36.12.45651: Flags [F.], seq
4254, ack 749, win 3752, options [nop,nop,TS val 122173419 ecr 975079],
length 0
12:17:59.951927 IP 10.4.36.12.45651 > 216.58.223.14.443: Flags [.], ack
4255, win 309, options [nop,nop,TS val 975079 ecr 122173419], length 0
^C
--
------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Sean Carte
2015-08-21 11:42:58 UTC
Permalink
Post by Hilton Gibson
We are using DSpace 5.3 in production now.
See: http://scholar.sun.ac.za
Our downloads work fine, perhaps your campus gateway/firewall is to blame?
Hi Hilton

I can't see how the campus gateway could have anything to do with it. The
tcpdump that I included was from the same VM that was running DSpace.
Whenever I click a download, DSpace contacts google-analytics and will time
out if no response is received.

I haven't made any changes to the config files, apart from the following
modifications to build.properties:

dspace.install.dir=/dspace
dspace.hostname = 10.4.36.12
dspace.baseUrl = http://10.4.36.12
dspace.ui = xmlui
dspace.url = ${dspace.baseUrl}/${dspace.ui}
db.password=4u7

DSpace 4.3 just downloads the file. DSpace 5.3 waits for a response from
google-analytics.

Sean
--
Andrea Schweer
2015-08-23 21:37:32 UTC
Permalink
Hi Sean,
Post by Sean Carte
When I download an item from my repository I have to wait for
google-analytics to respond. When the network gets busy this causes
delays and even time-outs.
[...]
Is there some way that I can prevent DSpace from attempting to contact
google-analytics?
I believe you can do this by commenting out the Google Analytics bean
here:
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/WEB-INF/spring/applicationContext.xml#L55
That should stop DSpace from trying to log bitstream views with Google
Analytics.

You might also like to file a bug
(https://jira.duraspace.org/browse/DS); logging statistics really
shouldn't prevent the user from downloading the file! It looks like
there's been a similar discussion for JSPUI:
https://jira.duraspace.org/browse/DS-1925.

cheers,
Andrea
--
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand


------------------------------------------------------------------------------
Sean Carte
2015-08-24 08:41:43 UTC
Permalink
Post by Andrea Schweer
Post by Sean Carte
When I download an item from my repository I have to wait for
google-analytics to respond. When the network gets busy this causes delays
and even time-outs.
[...]
Is there some way that I can prevent DSpace from attempting to contact
google-analytics?
I believe you can do this by commenting out the Google Analytics bean
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/WEB-INF/spring/applicationContext.xml#L55
That should stop DSpace from trying to log bitstream views with Google
Analytics.
You might also like to file a bug (https://jira.duraspace.org/browse/DS);
logging statistics really shouldn't prevent the user from downloading the
https://jira.duraspace.org/browse/DS-1925.
Thank you, Andrea. I have created the issue:
https://jira.duraspace.org/browse/DS-2718

Meanwhile I did as you suggested and commented out the GA bean; that has
resolved the issue for those servers that aren't using GA. Management are
not convinced that I should disable GA for our institutional repository,
which is using GA, however.

Sean
--

Loading...