You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(31) |
Nov
(25) |
Dec
(33) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(48) |
Feb
(62) |
Mar
(22) |
Apr
(29) |
May
(9) |
Jun
(45) |
Jul
(28) |
Aug
(41) |
Sep
(60) |
Oct
(96) |
Nov
(99) |
Dec
(70) |
| 2003 |
Jan
(98) |
Feb
(159) |
Mar
(164) |
Apr
(150) |
May
(143) |
Jun
(97) |
Jul
(184) |
Aug
(143) |
Sep
(207) |
Oct
(126) |
Nov
(159) |
Dec
(165) |
| 2004 |
Jan
(131) |
Feb
(229) |
Mar
(220) |
Apr
(212) |
May
(320) |
Jun
(223) |
Jul
(191) |
Aug
(390) |
Sep
(261) |
Oct
(229) |
Nov
(215) |
Dec
(184) |
| 2005 |
Jan
(221) |
Feb
(312) |
Mar
(336) |
Apr
(273) |
May
(359) |
Jun
(277) |
Jul
(303) |
Aug
(321) |
Sep
(256) |
Oct
(415) |
Nov
(428) |
Dec
(508) |
| 2006 |
Jan
(585) |
Feb
(419) |
Mar
(496) |
Apr
(296) |
May
(403) |
Jun
(404) |
Jul
(553) |
Aug
(296) |
Sep
(252) |
Oct
(416) |
Nov
(414) |
Dec
(245) |
| 2007 |
Jan
(354) |
Feb
(422) |
Mar
(389) |
Apr
(298) |
May
(397) |
Jun
(318) |
Jul
(315) |
Aug
(339) |
Sep
(253) |
Oct
(317) |
Nov
(350) |
Dec
(264) |
| 2008 |
Jan
(353) |
Feb
(313) |
Mar
(433) |
Apr
(383) |
May
(343) |
Jun
(355) |
Jul
(321) |
Aug
(338) |
Sep
(242) |
Oct
(206) |
Nov
(199) |
Dec
(279) |
| 2009 |
Jan
(327) |
Feb
(221) |
Mar
(280) |
Apr
(278) |
May
(237) |
Jun
(345) |
Jul
(322) |
Aug
(324) |
Sep
(676) |
Oct
(586) |
Nov
(735) |
Dec
(329) |
| 2010 |
Jan
(619) |
Feb
(424) |
Mar
(529) |
Apr
(241) |
May
(312) |
Jun
(554) |
Jul
(698) |
Aug
(576) |
Sep
(408) |
Oct
(268) |
Nov
(391) |
Dec
(426) |
| 2011 |
Jan
(629) |
Feb
(512) |
Mar
(465) |
Apr
(467) |
May
(475) |
Jun
(403) |
Jul
(426) |
Aug
(542) |
Sep
(418) |
Oct
(620) |
Nov
(614) |
Dec
(358) |
| 2012 |
Jan
(357) |
Feb
(466) |
Mar
(344) |
Apr
(215) |
May
(408) |
Jun
(375) |
Jul
(241) |
Aug
(260) |
Sep
(401) |
Oct
(461) |
Nov
(498) |
Dec
(294) |
| 2013 |
Jan
(453) |
Feb
(447) |
Mar
(434) |
Apr
(326) |
May
(295) |
Jun
(471) |
Jul
(463) |
Aug
(278) |
Sep
(525) |
Oct
(343) |
Nov
(389) |
Dec
(405) |
| 2014 |
Jan
(564) |
Feb
(324) |
Mar
(319) |
Apr
(319) |
May
(384) |
Jun
(259) |
Jul
(210) |
Aug
(219) |
Sep
(315) |
Oct
(478) |
Nov
(207) |
Dec
(316) |
| 2015 |
Jan
(222) |
Feb
(234) |
Mar
(201) |
Apr
(145) |
May
(367) |
Jun
(318) |
Jul
(195) |
Aug
(210) |
Sep
(234) |
Oct
(248) |
Nov
(217) |
Dec
(189) |
| 2016 |
Jan
(219) |
Feb
(177) |
Mar
(110) |
Apr
(91) |
May
(159) |
Jun
(124) |
Jul
(192) |
Aug
(119) |
Sep
(125) |
Oct
(64) |
Nov
(80) |
Dec
(68) |
| 2017 |
Jan
(156) |
Feb
(312) |
Mar
(386) |
Apr
(217) |
May
(89) |
Jun
(115) |
Jul
(79) |
Aug
(122) |
Sep
(100) |
Oct
(99) |
Nov
(129) |
Dec
(77) |
| 2018 |
Jan
(106) |
Feb
(78) |
Mar
(160) |
Apr
(73) |
May
(110) |
Jun
(160) |
Jul
(93) |
Aug
(92) |
Sep
(75) |
Oct
(147) |
Nov
(114) |
Dec
(97) |
| 2019 |
Jan
(141) |
Feb
(78) |
Mar
(158) |
Apr
(60) |
May
(123) |
Jun
(54) |
Jul
(44) |
Aug
(147) |
Sep
(117) |
Oct
(54) |
Nov
(74) |
Dec
(96) |
| 2020 |
Jan
(113) |
Feb
(125) |
Mar
(142) |
Apr
(57) |
May
(71) |
Jun
(99) |
Jul
(58) |
Aug
(81) |
Sep
(49) |
Oct
(50) |
Nov
(63) |
Dec
(37) |
| 2021 |
Jan
(37) |
Feb
(45) |
Mar
(39) |
Apr
(18) |
May
(14) |
Jun
(9) |
Jul
(44) |
Aug
(23) |
Sep
(13) |
Oct
(31) |
Nov
(13) |
Dec
(33) |
| 2022 |
Jan
(17) |
Feb
(8) |
Mar
(32) |
Apr
(7) |
May
(17) |
Jun
(7) |
Jul
(36) |
Aug
(29) |
Sep
(9) |
Oct
(20) |
Nov
(10) |
Dec
(1) |
| 2023 |
Jan
(30) |
Feb
(37) |
Mar
(23) |
Apr
(1) |
May
(14) |
Jun
(5) |
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
(48) |
Nov
(4) |
Dec
(29) |
| 2024 |
Jan
(1) |
Feb
|
Mar
(21) |
Apr
(6) |
May
(16) |
Jun
(41) |
Jul
(11) |
Aug
(17) |
Sep
(16) |
Oct
(11) |
Nov
(3) |
Dec
(9) |
| 2025 |
Jan
(7) |
Feb
(7) |
Mar
(6) |
Apr
(6) |
May
(30) |
Jun
(8) |
Jul
(10) |
Aug
(4) |
Sep
(10) |
Oct
(32) |
Nov
(3) |
Dec
|
|
From: Ted H. <meg...@gm...> - 2023-10-17 04:38:47
|
I'm using ubuntu lunar lobster. On Mon, Oct 16, 2023, 10:46 PM Claudius Teodorescu < cla...@gm...> wrote: > Hi, > > What operating system is installed? > > Claudius > > On Tue, 17 Oct 2023, 06:19 Ted Hickox, <meg...@gm...> wrote: > >> It's been a long time since I've worked with the eXist database. But I >> would like to work with it again. Unfortunately I have a very old Java >> version in my computer and I need some help in updating Java so I can >> successfully run eXist. Can anyone assist me? >> _______________________________________________ >> Exist-open mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-open >> > |
|
From: Claudius T. <cla...@gm...> - 2023-10-17 03:46:52
|
Hi, What operating system is installed? Claudius On Tue, 17 Oct 2023, 06:19 Ted Hickox, <meg...@gm...> wrote: > It's been a long time since I've worked with the eXist database. But I > would like to work with it again. Unfortunately I have a very old Java > version in my computer and I need some help in updating Java so I can > successfully run eXist. Can anyone assist me? > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
|
From: Ted H. <meg...@gm...> - 2023-10-17 03:17:55
|
It's been a long time since I've worked with the eXist database. But I would like to work with it again. Unfortunately I have a very old Java version in my computer and I need some help in updating Java so I can successfully run eXist. Can anyone assist me? |
|
From: Nicolas S. <sou...@gm...> - 2023-10-15 07:54:57
|
Hi, Thank you for your answer. I finally found the solution, the issue didn't come from the xmldb:login or SetUid/SetGid bits on the XQuery file's permissions but from the security I've add to the application, removing the guest user's ability to execute a function. I've changed this and everything works perfectly now. -- Best regards, Nicolas |
|
From: Jean-Paul R. <re...@gm...> - 2023-10-12 12:14:30
|
Hi Execution as "guest" is expected behaviour. Per https://exist-db.org/exist/apps/doc/scheduler#job-author you need to switch permissions or set the SetUid/SetGid bits on the XQuery file's permissions. Authoring Jobs The scheduler supports jobs that are authored in either XQuery or Java: XQuery Jobs Jobs coded in XQuery can be user type jobs only. An XQuery job is a standard XQuery Main Module which is stored in the database. You configure the scheduling of the job by providing the database path to the XQuery, for example: /db/my-collection/my-job.xq. XQuery job's are launched under the *guest* account. If you wish to perform tasks as another user , either switch permissions by calling xmldb:login() from within your job, or set the SetUid/SetGid bits on the XQuery file's permissions (see Security <https://exist-db.org/exist/apps/doc/security> for more information). Cheers, JPR On Thu, Oct 12, 2023 at 1:52 PM Nicolas Souchon < sou...@gm...> wrote: > Dear All, > > I'm trying to schedule a job to run an XQuery function every day, but I'm > encountering a problem that I don't know how to solve. According to the > documentation, I've added the following lines to eXist-db/etc/conf.xml: > > <job type="user" xquery="/db/apps/myapp/myjob.xql" period="86400000" > unschedule-on-exception="false"> > <parameter name="user" value="userName"/> > <parameter name="password" value="userPassword"/> > </job> > > With the XQuery attribute referring to my XQuery file (with a working > XQuery function) and the parameters defining the username and password > (which are also given in the XQuery file with xmldb:login()), but it > doesn't work. > > It seems that there are problems with the user, as indicated by the > scheduler.log file: > > 2023-10-12 13:31:45,491 [db.exist.scheduler.quartz-worker-3] INFO > (JobRunShell.java [run]:207) - Job eXist.User.XQuery: > /db/apps/myapp/myjob.xql threw a JobExecutionException: > org.quartz.JobExecutionException: UserXQueryJob Failed: Permission denied > for the scheduling user: guest! Unscheduling UserXQueryJob. > at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:251) > ~[exist-core-6.2.0.jar:6.2.0] > at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:247) > ~[exist-core-6.2.0.jar:6.2.0] > at org.exist.scheduler.UserXQueryJob.execute(UserXQueryJob.java:173) > ~[exist-core-6.2.0.jar:6.2.0] > at org.quartz.core.JobRunShell.run(JobRunShell.java:202) > ~[quartz-2.3.2.jar:?] > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) > ~[quartz-2.3.2.jar:?] > > Can anyone tell me how to solve this? I don't understand why the scheduler > is trying to run the function as Guest user. > > Best regards, > > Nicolas > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
|
From: Nicolas S. <sou...@gm...> - 2023-10-12 11:51:41
|
Dear All, I'm trying to schedule a job to run an XQuery function every day, but I'm encountering a problem that I don't know how to solve. According to the documentation, I've added the following lines to eXist-db/etc/conf.xml: <job type="user" xquery="/db/apps/myapp/myjob.xql" period="86400000" unschedule-on-exception="false"> <parameter name="user" value="userName"/> <parameter name="password" value="userPassword"/> </job> With the XQuery attribute referring to my XQuery file (with a working XQuery function) and the parameters defining the username and password (which are also given in the XQuery file with xmldb:login()), but it doesn't work. It seems that there are problems with the user, as indicated by the scheduler.log file: 2023-10-12 13:31:45,491 [db.exist.scheduler.quartz-worker-3] INFO (JobRunShell.java [run]:207) - Job eXist.User.XQuery: /db/apps/myapp/myjob.xql threw a JobExecutionException: org.quartz.JobExecutionException: UserXQueryJob Failed: Permission denied for the scheduling user: guest! Unscheduling UserXQueryJob. at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:251) ~[exist-core-6.2.0.jar:6.2.0] at org.exist.scheduler.UserXQueryJob.abort(UserXQueryJob.java:247) ~[exist-core-6.2.0.jar:6.2.0] at org.exist.scheduler.UserXQueryJob.execute(UserXQueryJob.java:173) ~[exist-core-6.2.0.jar:6.2.0] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.3.2.jar:?] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) ~[quartz-2.3.2.jar:?] Can anyone tell me how to solve this? I don't understand why the scheduler is trying to run the function as Guest user. Best regards, Nicolas |
|
From: Winona S. <wsa...@gm...> - 2023-09-14 02:03:36
|
Interesting, thanks. -Winona On Wed, Sep 13, 2023 at 7:27 AM Harris, Bernard T. (GSFC-5870) < ber...@na...> wrote: > I recently tested it on exist 6.2 and RH 7 and it worked (recipients > received the email). I used > > mail:send-email($msg, (), ()) > > I do not know if that difference is significant or about other > configurations. > > > > Bernie > > > > *From: *Winona Salesky <wsa...@gm...> > *Date: *Wednesday, September 13, 2023 at 7:17 AM > *To: *exist-open <exi...@li...> > *Subject: *[EXTERNAL] [BULK] [Exist-open] send-email function > > > > *CAUTION:* This email originated from outside of NASA. Please take care > when clicking links or opening attachments. Use the "Report Message" > button to report suspicious messages to the NASA SOC. > > > > Has the send-email() function changed or been depreciated? It no longer > works on my 6.1.0 version of eXist. I am trying to use the local send mail > server for the SMTP server. When I use it on a locally installed version, I > get true() but no email is sent, when I try using it on my production > version of my app (installed via docker on AWS) I get a 'connection > refused' error. > > > > Sample xquery: > > xquery version "3.1"; > > let $email := > <mail> > <from>wsa...@gm...</from> > <to>wsa...@gm...</to> > <subject>Test email client in eXist-db 2</subject> > <message> > <xhtml> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Test email client in eXist-db</title> > </head> > <body> > <p>Name: winona</p> > <p>e-mail: winona</p> > <p>Subject: test</p> > </body> > </html> > </xhtml> > </message> > </mail> > > return mail:send-email($email, '', '') > > > > > > Thanks for any insights. > > -Winona > > > |
|
From: Winona S. <wsa...@gm...> - 2023-09-13 13:05:41
|
Hi All, Since migrating to the new templating library (v1.1.0 in eXist-db v6.1.0) the error reporting has changed. With the new error reporting I do not have any way to trace back to the function that is causing the issue, it only tells me the templates:load-source function is failing. I used to get the name of my local function that was causing the issue, making it much easier to debug, especially when migrating a large old project. Is there a trick to debugging these sorts of errors, another way to track down the source of the bug? Thanks for the help, -Winona This is the error I get with the new templating library: templates:NotFound No template function found for call templates:load-source (Max arity of 20 has been exceeded in searching for this template function. If needed, adjust $templates:MAX_ARITY in the templates.xql module.) [at line 191, column 85, source: /Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] In function: templates:call(item(), element(), map(*)) [145:37:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [148:81:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [148:81:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [148:81:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [148:81:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [148:81:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [435:17:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process-output(element(), map(*), item()*) [230:9:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process-output(element(), map(*), item()*, element(function)) [211:9:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:call(item(), element(), map(*)) [145:37:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [133:51:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:process(node()*, map(*)) [90:9:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] templates:apply(node()+, function(*), map(*)?, map(*)?) [50:5:/Users/wsalesky/Library/Application Support/org.exist61/expathrepo/templating-1.1.0/content/templates.xqm] |
|
From: Harris, B. T. (GSFC-5870) <ber...@na...> - 2023-09-13 11:28:08
|
I recently tested it on exist 6.2 and RH 7 and it worked (recipients received the email). I used
mail:send-email($msg, (), ())
I do not know if that difference is significant or about other configurations.
Bernie
From: Winona Salesky <wsa...@gm...>
Date: Wednesday, September 13, 2023 at 7:17 AM
To: exist-open <exi...@li...>
Subject: [EXTERNAL] [BULK] [Exist-open] send-email function
CAUTION: This email originated from outside of NASA. Please take care when clicking links or opening attachments. Use the "Report Message" button to report suspicious messages to the NASA SOC.
Has the send-email() function changed or been depreciated? It no longer works on my 6.1.0 version of eXist. I am trying to use the local send mail server for the SMTP server. When I use it on a locally installed version, I get true() but no email is sent, when I try using it on my production version of my app (installed via docker on AWS) I get a 'connection refused' error.
Sample xquery:
xquery version "3.1";
let $email :=
<mail>
<from>wsa...@gm...<mailto:wsa...@gm...></from>
<to>wsa...@gm...<mailto:wsa...@gm...></to>
<subject>Test email client in eXist-db 2</subject>
<message>
<xhtml>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test email client in eXist-db</title>
</head>
<body>
<p>Name: winona</p>
<p>e-mail: winona</p>
<p>Subject: test</p>
</body>
</html>
</xhtml>
</message>
</mail>
return mail:send-email($email, '', '')
Thanks for any insights.
-Winona
|
|
From: Winona S. <wsa...@gm...> - 2023-09-13 11:15:48
|
Has the send-email() function changed or been depreciated? It no longer
works on my 6.1.0 version of eXist. I am trying to use the local send mail
server for the SMTP server. When I use it on a locally installed version, I
get true() but no email is sent, when I try using it on my production
version of my app (installed via docker on AWS) I get a 'connection
refused' error.
Sample xquery:
xquery version "3.1";
let $email :=
<mail>
<from>wsa...@gm...</from>
<to>wsa...@gm...</to>
<subject>Test email client in eXist-db 2</subject>
<message>
<xhtml>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test email client in eXist-db</title>
</head>
<body>
<p>Name: winona</p>
<p>e-mail: winona</p>
<p>Subject: test</p>
</body>
</html>
</xhtml>
</message>
</mail>
return mail:send-email($email, '', '')
Thanks for any insights.
-Winona
|
|
From: Erik S. <er...@xa...> - 2023-09-05 07:59:25
|
Declarative Amsterdam 2023 will be happening at CWI, Amsterdam Science Park on Thursday/Friday November 2 and 3, 2023. * Thursday morning is a tutorial session, with a hands-on Advanced XForms Tutorial. It is a “bring your own device” event and you will be expected to have pre-loaded some materials before attending. * Thursday afternoon and all day Friday is the symposium. There are many great presentations, as you can see in the full program at https://declarative.amsterdam/program The conference is a hybrid event, live at the Science Park in Amsterdam, and live-streamed. Registration is open; early bird registration closes 1st October, so hurry along to https://declarative.amsterdam/registration. Best wishes, The Declarative Amsterdam Conference Committee. |
|
From: Jo C. <Jo....@ha...> - 2023-08-11 17:05:33
|
Hi all,
Maybe turn things around.
Create the report first as a stub, say "<report/>".
Iterate over the source from the remote database, inserting something into
the report like
<item doc-id="{$doc-id}" version-id="{$version-id"}/>
This will give you a doc with 5 million+ nodes, but should be within
capability. Then iterate over the item elements, inserting a new
attribute indicating the result of your test against that item.
If you find yourself running into limits that can't be fixed
environmentally, reduce the scope of your SQL query, and generate reports
for disjoint subsets.
Cheers, -- Jo
On Fri, Aug 11, 2023 at 3:54 PM Lizzi, Vincent <
Vin...@ta...> wrote:
> Hi Alasdair,
>
>
>
> Thanks for the response. Here is what I’m trying to do.
>
>
>
> The eXist database holds XML documents that were loaded from an archive.
> The number of documents is approaching 5 million but might be higher due to
> multiple versions of documents. I want to verify that the holdings in eXist
> are complete and up to date, and report any differences. The SQL query
> provides a list containing pairs of a document identifier (unique string)
> and a version identifier (unique integer). I divided this task into steps
> with separate XQueries to make it more manageable. The first step is to
> retrieve this list from a SQL database. The second step is to compare the
> list with the eXist database (which has range indexes on the identifiers)
> and add a status column to the list. The third step is to produce a report.
> The last step will be to use the report to correct any differences. I
> previously tried writing one query to do the first three steps, but it
> seemed to work better as separate smaller steps.
>
>
>
> Any suggestions would be welcome.
>
>
>
> Vincent
>
>
>
> _____________________________________________
>
> *Vincent M. Lizzi*
>
> Head of Information Standards | Taylor & Francis Group
>
> vin...@ta...
>
>
>
> Information Classification: General
>
> *From:* Alasdair Dougall <ala...@gm...>
> *Sent:* Thursday, August 10, 2023 5:34 PM
> *To:* Lizzi, Vincent <Vin...@ta...>
> *Cc:* Jean-Paul Rehr <re...@gm...>; Exist-open <
> exi...@li...>
> *Subject:* Re: [Exist-open] high memory usage when constructing a string
>
>
>
> Vincent,
>
>
>
> As Jean-Paul said in his reply, there are alternative ways to build large
> outputs.
>
>
>
> Maybe describe the outcome you are trying to achieve as opposed to the
> issue you are finding. There are generally more than one way to do things
> in eXist.
>
>
>
> Alasdair
>
> Sent from my iPhone
>
>
>
> On 11 Aug 2023, at 1:42 am, Lizzi, Vincent <
> Vin...@ta...> wrote:
>
>
>
> Hi JPR,
>
>
>
> That sounds like a good idea. Unfortunately, trying to use JSON for this
> amount of data also results in out of memory errors.
>
>
>
> array:join(
>
> (1 to 200000000) ! ['1']
>
> ) => serialize(map{'method': 'json'})
>
>
>
> I have gotten eXist to process actual data in tab separated text format
> when eXist is freshly started and has plenty of memory available, but even
> in this ideal condition memory usage is still unexpectedly high and
> sometimes produces out of memory errors.
>
>
>
> Thanks,
>
> Vincent
>
>
>
> _____________________________________________
>
> *Vincent M. Lizzi*
>
> Head of Information Standards | Taylor & Francis Group
>
> vin...@ta...
>
>
>
>
>
> Information Classification: General
>
> *From:* Jean-Paul Rehr <re...@gm...>
> *Sent:* Thursday, August 10, 2023 10:06 AM
> *To:* Exist-open <exi...@li...>
> *Subject:* Re: [Exist-open] high memory usage when constructing a string
>
>
>
> Dear Vincent,
>
>
>
> Have you tried outputting JSON structure data from the database? It will
> be easier to store and access later using Xquery via arrays and maps. You
> could even chunk it if eXist chokes on a large file - I've never handled
> one of that size.
>
>
>
> Cheers,
>
> JPR
>
>
>
> On Thu, Aug 10, 2023 at 3:24 PM Lizzi, Vincent <
> Vin...@ta...> wrote:
>
> Hello eXist folks,
>
>
>
> I’m observing that asking eXist to construct a string of about 200 Mb uses
> more than 4 Gb of memory.
>
>
>
> When running a query such as this that constructs a string of 200,000,000
> bytes:
>
>
>
> string-join(( (1 to 200000000) ! '1' ))
>
>
>
> Monex shows the memory usage climbs to over 4 Gb.
>
>
>
> This sometimes exhausts the available memory and results in a stack trace
> being printed exist.log, the top of which shows:
>
>
>
> 2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java
> [process]:549) - Java heap space
>
> java.lang.OutOfMemoryError: Java heap space
>
> at
> org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273)
> ~[exist-core-6.2.0.jar:6.2.0]
>
> at
> org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382)
> ~[exist-core-6.2.0.jar:6.2.0]
>
>
>
> I would guess that constructing a document uses a lot more memory than
> constructing a simple string. Is there a way to signal eXist to use a
> simple string builder instead?
>
>
>
> The example above is a simplification of what I actually want to do, which
> is to retrieve data from a SQL database and store the results in eXist to
> use for later processing. The data contains nearly 5 million rows with only
> 2 columns, so tab separated text would seem to be the most efficient way to
> store this data in eXist. Here is the relevant portion of the query:
>
>
>
> let $data as xs:string :=
>
> string-join(
>
> sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(),
> '	')
>
> , '
')
>
> return xmldb:store-as-binary('/db/temp', 'list.txt', $data)
>
>
>
> Is there a more efficient way to do this in eXist?
>
>
>
> Thanks,
>
> Vincent
>
>
>
> ______________________________________________
>
> *Vincent M. Lizzi*
>
> Head of Information Standards | Taylor & Francis Group
>
> 530 Walnut St., Suite 850, Philadelphia, PA 19106
>
> E-Mail: vin...@ta...
>
> Web: www.tandfonline.com
>
>
>
> Taylor & Francis is a trading name of Informa UK Limited,
>
> registered in England under no. 1072954
>
>
>
> "Everything should be made as simple as possible, but not simpler."
>
>
>
>
>
> Information Classification: General
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
|
|
From: Lizzi, V. <Vin...@ta...> - 2023-08-11 14:54:53
|
Hi Alasdair,
Thanks for the response. Here is what I’m trying to do.
The eXist database holds XML documents that were loaded from an archive. The number of documents is approaching 5 million but might be higher due to multiple versions of documents. I want to verify that the holdings in eXist are complete and up to date, and report any differences. The SQL query provides a list containing pairs of a document identifier (unique string) and a version identifier (unique integer). I divided this task into steps with separate XQueries to make it more manageable. The first step is to retrieve this list from a SQL database. The second step is to compare the list with the eXist database (which has range indexes on the identifiers) and add a status column to the list. The third step is to produce a report. The last step will be to use the report to correct any differences. I previously tried writing one query to do the first three steps, but it seemed to work better as separate smaller steps.
Any suggestions would be welcome.
Vincent
_____________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
vin...@ta...<mailto:vin...@ta...>
Information Classification: General
From: Alasdair Dougall <ala...@gm...>
Sent: Thursday, August 10, 2023 5:34 PM
To: Lizzi, Vincent <Vin...@ta...>
Cc: Jean-Paul Rehr <re...@gm...>; Exist-open <exi...@li...>
Subject: Re: [Exist-open] high memory usage when constructing a string
Vincent,
As Jean-Paul said in his reply, there are alternative ways to build large outputs.
Maybe describe the outcome you are trying to achieve as opposed to the issue you are finding. There are generally more than one way to do things in eXist.
Alasdair
Sent from my iPhone
On 11 Aug 2023, at 1:42 am, Lizzi, Vincent <Vin...@ta...<mailto:Vin...@ta...>> wrote:
Hi JPR,
That sounds like a good idea. Unfortunately, trying to use JSON for this amount of data also results in out of memory errors.
array:join(
(1 to 200000000) ! ['1']
) => serialize(map{'method': 'json'})
I have gotten eXist to process actual data in tab separated text format when eXist is freshly started and has plenty of memory available, but even in this ideal condition memory usage is still unexpectedly high and sometimes produces out of memory errors.
Thanks,
Vincent
_____________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
vin...@ta...<mailto:vin...@ta...>
Information Classification: General
From: Jean-Paul Rehr <re...@gm...<mailto:re...@gm...>>
Sent: Thursday, August 10, 2023 10:06 AM
To: Exist-open <exi...@li...<mailto:exi...@li...>>
Subject: Re: [Exist-open] high memory usage when constructing a string
Dear Vincent,
Have you tried outputting JSON structure data from the database? It will be easier to store and access later using Xquery via arrays and maps. You could even chunk it if eXist chokes on a large file - I've never handled one of that size.
Cheers,
JPR
On Thu, Aug 10, 2023 at 3:24 PM Lizzi, Vincent <Vin...@ta...<mailto:Vin...@ta...>> wrote:
Hello eXist folks,
I’m observing that asking eXist to construct a string of about 200 Mb uses more than 4 Gb of memory.
When running a query such as this that constructs a string of 200,000,000 bytes:
string-join(( (1 to 200000000) ! '1' ))
Monex shows the memory usage climbs to over 4 Gb.
This sometimes exhausts the available memory and results in a stack trace being printed exist.log, the top of which shows:
2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java [process]:549) - Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273) ~[exist-core-6.2.0.jar:6.2.0]
at org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382) ~[exist-core-6.2.0.jar:6.2.0]
I would guess that constructing a document uses a lot more memory than constructing a simple string. Is there a way to signal eXist to use a simple string builder instead?
The example above is a simplification of what I actually want to do, which is to retrieve data from a SQL database and store the results in eXist to use for later processing. The data contains nearly 5 million rows with only 2 columns, so tab separated text would seem to be the most efficient way to store this data in eXist. Here is the relevant portion of the query:
let $data as xs:string :=
string-join(
sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(), '	')
, '
')
return xmldb:store-as-binary('/db/temp', 'list.txt', $data)
Is there a more efficient way to do this in eXist?
Thanks,
Vincent
______________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vin...@ta...<mailto:vin...@ta...>
Web: www.tandfonline.com<http://www.tandfonline.com>
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
_______________________________________________
Exist-open mailing list
Exi...@li...<mailto:Exi...@li...>
https://lists.sourceforge.net/lists/listinfo/exist-open<https://lists.sourceforge.net/lists/listinfo/exist-open>
_______________________________________________
Exist-open mailing list
Exi...@li...<mailto:Exi...@li...>
https://lists.sourceforge.net/lists/listinfo/exist-open<https://lists.sourceforge.net/lists/listinfo/exist-open>
|
|
From: Alasdair D. <ala...@gm...> - 2023-08-10 21:34:25
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8">Vincent,<div><br></div><div>As Jean-Paul said in his reply, there are alternative ways to build large outputs.</div><div><br></div><div>Maybe describe the outcome you are trying to achieve as opposed to the issue you are finding. There are generally more than one way to do things in eXist.</div><div><br></div><div>Alasdair <br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On 11 Aug 2023, at 1:42 am, Lizzi, Vincent <Vin...@ta...> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>@font-face { font-family: "Cambria Math"; }
@font-face { font-family: Calibri; }
@font-face { font-family: Verdana; }
@font-face { font-family: Rockwell; }
p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; }
a:link, span.MsoHyperlink { color: blue; text-decoration: underline; }
span.EmailStyle20 { font-family: Calibri, sans-serif; color: windowtext; }
.MsoChpDefault { font-family: Calibri, sans-serif; }
@page WordSection1 { size: 8.5in 11in; margin: 1in; }
div.WordSection1 { page: WordSection1; }</style>
<div class="WordSection1">
<p class="MsoNormal">Hi JPR,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That sounds like a good idea. Unfortunately, trying to use JSON for this amount of data also results in out of memory errors.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">array:join(<o:p></o:p></p>
<p class="MsoNormal">(1 to 200000000) ! ['1']<o:p></o:p></p>
<p class="MsoNormal">) => serialize(map{'method': 'json'})<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have gotten eXist to process actual data in tab separated text format when eXist is freshly started and has plenty of memory available, but even in this ideal condition memory usage is still unexpectedly high and sometimes produces out
of memory errors. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Vincent<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">_____________________________________________<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Vincent M. Lizzi<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Head of Information Standards | Taylor & Francis Group
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"><a href="mailto:vin...@ta..."><span style="color:#0563C1">vin...@ta...</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<br>
<p style="font-family:Rockwell;font-size:9pt;color:#0078D7;margin:15pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
Information Classification: General<br>
</p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Jean-Paul Rehr <re...@gm...> <br>
<b>Sent:</b> Thursday, August 10, 2023 10:06 AM<br>
<b>To:</b> Exist-open <exi...@li...><br>
<b>Subject:</b> Re: [Exist-open] high memory usage when constructing a string<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Dear Vincent,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Have you tried outputting JSON structure data from the database? It will be easier to store and access later using Xquery via arrays and maps. You could even chunk it if eXist chokes on a large file - I've never handled one of that size.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">JPR<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Aug 10, 2023 at 3:24 PM Lizzi, Vincent <<a href="mailto:Vin...@ta...">Vin...@ta...</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello eXist folks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’m observing that asking eXist to construct a string of about 200 Mb uses more than 4 Gb of memory.
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">When running a query such as this that constructs a string of 200,000,000 bytes:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">string-join(( (1 to 200000000) ! '1' ))<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Monex shows the memory usage climbs to over 4 Gb.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">This sometimes exhausts the available memory and results in a stack trace being printed exist.log, the top of which shows:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java [process]:549) - Java heap space
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">java.lang.OutOfMemoryError: Java heap space<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> at org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273) ~[exist-core-6.2.0.jar:6.2.0]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> at org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382) ~[exist-core-6.2.0.jar:6.2.0]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I would guess that constructing a document uses a lot more memory than constructing a simple string. Is there a way to signal eXist to use a simple string builder instead?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The example above is a simplification of what I actually want to do, which is to retrieve data from a SQL database and store the results in eXist to use for later processing. The
data contains nearly 5 million rows with only 2 columns, so tab separated text would seem to be the most efficient way to store this data in eXist. Here is the relevant portion of the query:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">let $data as xs:string :=<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string-join(<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(), '&#x9;')<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> , '&#xA;')<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">return xmldb:store-as-binary('/db/temp', 'list.txt', $data)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is there a more efficient way to do this in eXist?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Vincent<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">______________________________________________</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Vincent M. Lizzi</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">Head of Information Standards | Taylor & Francis Group
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif">530 Walnut St., Suite 850, Philadelphia, PA 19106</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif">E-Mail:
<a href="mailto:vin...@ta..." target="_blank">vin...@ta...</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif">Web:
<a href="http://www.tandfonline.com" target="_blank">
www.tandfonline.com</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif">Taylor & Francis is a trading name of Informa UK Limited,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:8.0pt;font-family:"Verdana",sans-serif">registered in England under no. 1072954</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Arial",sans-serif">"Everything should be made as simple as possible, but not simpler."</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:15.0pt"><span style="font-size:9.0pt;font-family:"Rockwell",serif;color:#0078D7">Information Classification: General<o:p></o:p></span></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
Exist-open mailing list<br>
<a href="mailto:Exi...@li..." target="_blank">Exi...@li...</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/exist-open" target="_blank">https://lists.sourceforge.net/lists/listinfo/exist-open</a><o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
<span>_______________________________________________</span><br><span>Exist-open mailing list</span><br><span>Exi...@li...</span><br><span>https://lists.sourceforge.net/lists/listinfo/exist-open</span><br></div></blockquote></div></div></body></html> |
|
From: Lizzi, V. <Vin...@ta...> - 2023-08-10 15:41:17
|
Hi JPR,
That sounds like a good idea. Unfortunately, trying to use JSON for this amount of data also results in out of memory errors.
array:join(
(1 to 200000000) ! ['1']
) => serialize(map{'method': 'json'})
I have gotten eXist to process actual data in tab separated text format when eXist is freshly started and has plenty of memory available, but even in this ideal condition memory usage is still unexpectedly high and sometimes produces out of memory errors.
Thanks,
Vincent
_____________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
vin...@ta...<mailto:vin...@ta...>
Information Classification: General
From: Jean-Paul Rehr <re...@gm...>
Sent: Thursday, August 10, 2023 10:06 AM
To: Exist-open <exi...@li...>
Subject: Re: [Exist-open] high memory usage when constructing a string
Dear Vincent,
Have you tried outputting JSON structure data from the database? It will be easier to store and access later using Xquery via arrays and maps. You could even chunk it if eXist chokes on a large file - I've never handled one of that size.
Cheers,
JPR
On Thu, Aug 10, 2023 at 3:24 PM Lizzi, Vincent <Vin...@ta...<mailto:Vin...@ta...>> wrote:
Hello eXist folks,
I’m observing that asking eXist to construct a string of about 200 Mb uses more than 4 Gb of memory.
When running a query such as this that constructs a string of 200,000,000 bytes:
string-join(( (1 to 200000000) ! '1' ))
Monex shows the memory usage climbs to over 4 Gb.
This sometimes exhausts the available memory and results in a stack trace being printed exist.log, the top of which shows:
2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java [process]:549) - Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273) ~[exist-core-6.2.0.jar:6.2.0]
at org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382) ~[exist-core-6.2.0.jar:6.2.0]
I would guess that constructing a document uses a lot more memory than constructing a simple string. Is there a way to signal eXist to use a simple string builder instead?
The example above is a simplification of what I actually want to do, which is to retrieve data from a SQL database and store the results in eXist to use for later processing. The data contains nearly 5 million rows with only 2 columns, so tab separated text would seem to be the most efficient way to store this data in eXist. Here is the relevant portion of the query:
let $data as xs:string :=
string-join(
sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(), '	')
, '
')
return xmldb:store-as-binary('/db/temp', 'list.txt', $data)
Is there a more efficient way to do this in eXist?
Thanks,
Vincent
______________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vin...@ta...<mailto:vin...@ta...>
Web: www.tandfonline.com<http://www.tandfonline.com>
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
_______________________________________________
Exist-open mailing list
Exi...@li...<mailto:Exi...@li...>
https://lists.sourceforge.net/lists/listinfo/exist-open<https://lists.sourceforge.net/lists/listinfo/exist-open>
|
|
From: Jean-Paul R. <re...@gm...> - 2023-08-10 14:06:23
|
Dear Vincent,
Have you tried outputting JSON structure data from the database? It will be
easier to store and access later using Xquery via arrays and maps. You
could even chunk it if eXist chokes on a large file - I've never handled
one of that size.
Cheers,
JPR
On Thu, Aug 10, 2023 at 3:24 PM Lizzi, Vincent <
Vin...@ta...> wrote:
> Hello eXist folks,
>
>
>
> I’m observing that asking eXist to construct a string of about 200 Mb uses
> more than 4 Gb of memory.
>
>
>
> When running a query such as this that constructs a string of 200,000,000
> bytes:
>
>
>
> string-join(( (1 to 200000000) ! '1' ))
>
>
>
> Monex shows the memory usage climbs to over 4 Gb.
>
>
>
> This sometimes exhausts the available memory and results in a stack trace
> being printed exist.log, the top of which shows:
>
>
>
> 2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java
> [process]:549) - Java heap space
>
> java.lang.OutOfMemoryError: Java heap space
>
> at
> org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273)
> ~[exist-core-6.2.0.jar:6.2.0]
>
> at
> org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382)
> ~[exist-core-6.2.0.jar:6.2.0]
>
>
>
> I would guess that constructing a document uses a lot more memory than
> constructing a simple string. Is there a way to signal eXist to use a
> simple string builder instead?
>
>
>
> The example above is a simplification of what I actually want to do, which
> is to retrieve data from a SQL database and store the results in eXist to
> use for later processing. The data contains nearly 5 million rows with only
> 2 columns, so tab separated text would seem to be the most efficient way to
> store this data in eXist. Here is the relevant portion of the query:
>
>
>
> let $data as xs:string :=
>
> string-join(
>
> sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(),
> '	')
>
> , '
')
>
> return xmldb:store-as-binary('/db/temp', 'list.txt', $data)
>
>
>
> Is there a more efficient way to do this in eXist?
>
>
>
> Thanks,
>
> Vincent
>
>
>
> ______________________________________________
>
> *Vincent M. Lizzi*
>
> Head of Information Standards | Taylor & Francis Group
>
> 530 Walnut St., Suite 850, Philadelphia, PA 19106
>
> E-Mail: vin...@ta...
>
> Web: www.tandfonline.com
>
>
>
> Taylor & Francis is a trading name of Informa UK Limited,
>
> registered in England under no. 1072954
>
>
>
> "Everything should be made as simple as possible, but not simpler."
>
>
>
> Information Classification: General
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
|
|
From: Lizzi, V. <Vin...@ta...> - 2023-08-10 13:22:59
|
Hello eXist folks,
I'm observing that asking eXist to construct a string of about 200 Mb uses more than 4 Gb of memory.
When running a query such as this that constructs a string of 200,000,000 bytes:
string-join(( (1 to 200000000) ! '1' ))
Monex shows the memory usage climbs to over 4 Gb.
This sometimes exhausts the available memory and results in a stack trace being printed exist.log, the top of which shows:
2023-08-09 23:12:40,553 [qtp353417634-34] ERROR (XQueryServlet.java [process]:549) - Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.exist.dom.memtree.DocumentImpl.addChars(DocumentImpl.java:273) ~[exist-core-6.2.0.jar:6.2.0]
at org.exist.dom.memtree.MemTreeBuilder.characters(MemTreeBuilder.java:382) ~[exist-core-6.2.0.jar:6.2.0]
I would guess that constructing a document uses a lot more memory than constructing a simple string. Is there a way to signal eXist to use a simple string builder instead?
The example above is a simplification of what I actually want to do, which is to retrieve data from a SQL database and store the results in eXist to use for later processing. The data contains nearly 5 million rows with only 2 columns, so tab separated text would seem to be the most efficient way to store this data in eXist. Here is the relevant portion of the query:
let $data as xs:string :=
string-join(
sql:execute($cn, $sh, (), true())/sql:row/string-join(*/text(), '	')
, '
')
return xmldb:store-as-binary('/db/temp', 'list.txt', $data)
Is there a more efficient way to do this in eXist?
Thanks,
Vincent
______________________________________________
Vincent M. Lizzi
Head of Information Standards | Taylor & Francis Group
530 Walnut St., Suite 850, Philadelphia, PA 19106
E-Mail: vin...@ta...<mailto:vin...@ta...>
Web: www.tandfonline.com<http://www.tandfonline.com>
Taylor & Francis is a trading name of Informa UK Limited,
registered in England under no. 1072954
"Everything should be made as simple as possible, but not simpler."
Information Classification: General
|
|
From: Craig B. <cra...@ma...> - 2023-07-21 19:07:04
|
> On Jul 19, 2023, at 8:21 AM, Jo Calder <Jo....@ha...> wrote: > > I am trying to get LDAP authentication to work against a Samba AD DC setup. Here's an anonymized version of my config.xml <snip> > Does anyone have this or similar setup working? > > Install details are: > eXist Version: 5.3.1 [but also relevant on later builds] eXist Build: 20211214004738 Operating System: Linux 3.10.0-1062.12.1.el7.x86_64 amd64 Java Version: 1.8.0_242 > > Any tips or hints are very welcome. Best regards, -- Jo > I've never tried LDAP with eXist, but if you haven't already done so be sure to verify LDAP is working independently of eXist and that the TLS situation is up to snuff (valid, unexpired cert, etc.). Start with something like: $ openssl s_client -showcerts samba-ad-dc.local.my-domain.com:636 <http://samba-ad-dc.local.my-domain.com:636/> There are also various ldapsearch commands, and Samba apparently has logging options that might tell you what the exact authentication error is. ________________________________________ Craig A. Berry "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser |
|
From: Jo C. <Jo....@ha...> - 2023-07-19 13:22:09
|
Hi all, I am trying to get LDAP authentication to work against a Samba AD DC setup. Here's an anonymized version of my config.xml <security-manager xmlns="http://exist-db.org/Configuration" version="2.1"> <authentication-entry-point>/authentication/login</authentication-entry-point> <realm id="LDAP" version="1.0" principals-are-case-insensitive="true"> <context> <authentication> simple </authentication> <use-ssl>true</use-ssl> <url>ldaps://samba-ad-dc.local.my-domain.com</url> <domain>local.my-domain.com</domain> <search> <base>DC=local,DC=my-domain,DC=com</base> <default-username>te...@lo...</default-username> <default-password>test-password</default-password> <account> <search-filter-prefix>objectClass=user</search-filter-prefix> <search-attribute key="objectSid">objectSid</search-attribute> <search-attribute key="primaryGroupID">primaryGroupID</search-attribute> <search-attribute key="name">sAMAccountName</search-attribute> <search-attribute key="dn">distinguishedName</search-attribute> <search-attribute key="memberOf">memberOf</search-attribute> <metadata-search-attribute key="http://axschema.org/namePerson/first ">givenName</metadata-search-attribute> <metadata-search-attribute key="http://axschema.org/contact/email ">mail</metadata-search-attribute> <metadata-search-attribute key="http://axschema.org/namePerson/last ">sn</metadata-search-attribute> <metadata-search-attribute key="http://axschema.org/namePerson ">name</metadata-search-attribute> </account> <group> <search-filter-prefix>objectClass=group</search-filter-prefix> <search-attribute key="member">member</search-attribute> <search-attribute key="primaryGroupToken">primaryGroupToken</search-attribute> <search-attribute key="objectSid">objectSid</search-attribute> <search-attribute key="name">sAMAccountName</search-attribute> <search-attribute key="dn">distinguishedName</search-attribute> <whitelist> <principal>Domain Users</principal> </whitelist> </group> </search> <transformation> <add-group>group.users</add-group> </transformation> </context> </realm> <!--<events></events>--> </security-manager> based on http://demo.exist-db.org/exist/apps/doc/security and the example here. Logins as, e.g., me...@lo... fail with (what looks like) an unknown exception: org.exist.security.AuthenticationException: samba-ad-dc.local.my-domain.com:636 at org.exist.security.realm.ldap.LDAPRealm.authenticate(LDAPRealm.java:152) ~[exist-security-ldap-5.3.1.jar:5.3.1] Does anyone have this or similar setup working? Install details are: eXist Version: 5.3.1 [but also relevant on later builds] eXist Build: 20211214004738 Operating System: Linux 3.10.0-1062.12.1.el7.x86_64 amd64 Java Version: 1.8.0_242 Any tips or hints are very welcome. Best regards, -- Jo |
|
From: Erik S. <er...@xa...> - 2023-07-19 09:44:01
|
Reminder:
The fifth edition of Declarative Amsterdam will take place on 2 and 3 November 2023 at the Science Park, Amsterdam. It will be a hybrid conference with the opportunity to attend live or online, for both attendees and presenters.
The first day will feature tutorials, combining presentations and hands-on sessions to give an introduction to specific topics. The second day will be a symposium, with shorter presentations. Speakers can discuss new ideas, frameworks, applications of declarative methods, and best practices.
Declarative techniques are a style of computing that expresses the purpose of computation without describing its control flow. It allows you to focus on the ‘what’, rather than the ‘how’.
Declarative Amsterdam will have presentations on past experiences, current trends and future perspectives in fields such as functional programming, declarative data modelling, databases, XML and related technologies, JSON, CSS, semantic web, data science, data visualization, grammars, parsing, and domain-specific languages.
Call for Presentations
We invite practitioners, software architects and engineers, academic researchers and others to submit a proposal for a tutorial or a presentation.
Tutorials can be between 1.5 and 2.5 hours, and preferably include hands-on sessions for participants. Presentations on the second day can be between 20 and 45 minutes. Speakers can present in person, or prepare a video, and be available online for the question and answer session afterwards.
Proposals should include a title, duration and summary (90 - 200 words), and may also include a full paper. Speakers have the option of submitting a full paper or slides, to be published on the Declarative Amsterdam website.
For papers and topics from previous years, see the website: <https://declarative.amsterdam/> https://declarative.amsterdam/
Please submit proposals at <https://declarative.amsterdam/cfp> https://declarative.amsterdam/cfp
Timeline
Submission deadline: 31 July
Acceptance: Beginning of September
Videos: Beginning of October
Conference: 2 and 3 November
All the best,
Declarative Amsterdam organizing committee
|
|
From: Gus R. <gu...@gm...> - 2023-06-21 16:16:21
|
Hello, I am trying to create a query for the lucene index using an xml fragment as described here: https://exist-db.org/exist/apps/doc/lucene Let's say my query is something like this in the "normal" syntax: for $hit in collection($config:data-index)//tei:TEI[ft:query(., textcontent:$guess AND timemin:[0000 TO 1600], $query_options)] How would I write the query in XML? I have this for the first part: <query> <wildcard field="textcontent">{$guess}</wildcard> </query> But I have no idea which element to use for the ranged query ( timemin: [0000 TO 1600] ). The example in the documentation just says: Ranged queries using TO are also supported. Suppose you have marked dates and wish to return only results between 1600 and 1610. let $query := "date:[1600 TO 1610]" return ft:search($col, $query)//exist:match It does not say how to do it using the XML definition of the query. Non of the listed elements (wildcard, term, etc.) seems to work. I would really appreciate some help on this. Thanks a lot! Gustavo Fernández Riva Wissenschaftlicher Mitarbeiter Universität Heidelberg – Universitätsbibliothek Plöck 107-109, D-69117 Heidelberg Tel.: +49-(0)6221-54 2033 Mail: gus...@ub... <gus...@un...> |
|
From: Nicolas S. <sou...@gm...> - 2023-06-07 15:08:28
|
Dear Craig, Dear Joe, Thank you very much for your help. Craig's query actually didn't work when I first used it but I installed the "Shared Resources: jquery, dojo, ace, templating, utilities" package and everything works now. -- Best regards, Nicolas |
|
From: Joe W. <jo...@gm...> - 2023-06-07 14:23:55
|
Hi Nicolas, Craig's query will work if you have the shared-resources package installed, but if not (it is no longer included in eXist releases), you will receive an error: > Cannot compile xquery: err:XQST0059 error found while loading module dbutil: failed to load module: 'http://exist-db.org/xquery/dbutil' from: ' http://exist-db.org/xquery/dbutil', location: ' http://exist-db.org/xquery/dbutil'. Source not found. The solution is either to install the shared-resources package via Dashboard > Package Manager, or to use eXide's bundled version, by changing the module import declaration to: import module namespace dbutil="http://exist-db.org/xquery/dbutil" at "/db/apps/eXide/modules/dbutils.xqm"; Joe On Tue, Jun 6, 2023 at 3:42 PM Craig Berry via Exist-open < exi...@li...> wrote: > > > > On Jun 6, 2023, at 2:04 PM, Nicolas Souchon < > sou...@gm...> wrote: > > > > Dear All, > > > > I'm new to eXist-db and can't figure out how to change ownership of a > folder and all the folders and files it contains at once from eXide. > > > > I know how to change ownership of one folder or file at a time but how > can I change ownership of a large number of folders/files at once? Knowing > that changing the ownership of the folder does not change the ownership of > the items it contains. > > > > To be more clear, my application is owned by user A but one of the > folders composing it is owned by user B and user A cannot access the > contents of this folder, so I would like to change the ownership of the > folder and its content from user B to user A. > > > > Thank you in advance for your help. > > I had to do this the other day and couldn't find a straightforward way. I > ended up writing the following. Be sure to substitute your own root path > and the desired owner, group and permissions. > > xquery version "3.1"; > > import module namespace dbutil="http://exist-db.org/xquery/dbutil"; > import module namespace console="http://exist-db.org/xquery/console"; > > declare function local:setperm($path as xs:string) { > let $x := sm:chown($path, 'owner') > let $x := sm:chgrp($path, 'group') > let $x := sm:chmod($path, 'rwxrwxr--') > let $x := console:log('Ownership and permissions set on ' || $path) > return $x > }; > > let $root := '/db/apps/somepath' > return dbutil:scan(xs:anyURI($root), function($col, $path) { > let $x := local:setperm(($path, $col)[1]) > return $x > }) > > > > > > > > ________________________________________ > Craig A. Berry > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |
|
From: Craig B. <cra...@ma...> - 2023-06-06 19:41:37
|
> On Jun 6, 2023, at 2:04 PM, Nicolas Souchon <sou...@gm...> wrote: > > Dear All, > > I'm new to eXist-db and can't figure out how to change ownership of a folder and all the folders and files it contains at once from eXide. > > I know how to change ownership of one folder or file at a time but how can I change ownership of a large number of folders/files at once? Knowing that changing the ownership of the folder does not change the ownership of the items it contains. > > To be more clear, my application is owned by user A but one of the folders composing it is owned by user B and user A cannot access the contents of this folder, so I would like to change the ownership of the folder and its content from user B to user A. > > Thank you in advance for your help. I had to do this the other day and couldn't find a straightforward way. I ended up writing the following. Be sure to substitute your own root path and the desired owner, group and permissions. xquery version "3.1"; import module namespace dbutil="http://exist-db.org/xquery/dbutil"; import module namespace console="http://exist-db.org/xquery/console"; declare function local:setperm($path as xs:string) { let $x := sm:chown($path, 'owner') let $x := sm:chgrp($path, 'group') let $x := sm:chmod($path, 'rwxrwxr--') let $x := console:log('Ownership and permissions set on ' || $path) return $x }; let $root := '/db/apps/somepath' return dbutil:scan(xs:anyURI($root), function($col, $path) { let $x := local:setperm(($path, $col)[1]) return $x }) ________________________________________ Craig A. Berry "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser |
|
From: Nicolas S. <sou...@gm...> - 2023-06-06 19:05:15
|
Dear All, I'm new to eXist-db and can't figure out how to change ownership of a folder and all the folders and files it contains at once from eXide. I know how to change ownership of one folder or file at a time but how can I change ownership of a large number of folders/files at once? Knowing that changing the ownership of the folder does not change the ownership of the items it contains. To be more clear, my application is owned by user A but one of the folders composing it is owned by user B and user A cannot access the contents of this folder, so I would like to change the ownership of the folder and its content from user B to user A. Thank you in advance for your help. -- Best regards, Nicolas |