Web based family history software

This Help forum is for issues relates to the latest release (1.6.x). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here.

Question List of sources

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #1 by wimniny
List of sources was created by wimniny
When I try to list the sources, I get this message:
Fatal error: Out of memory (allocated 239861760) (tried to allocate 71 bytes) in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/library/WT/Fact.php on line 44

What can I do about it?

Kind regards, Wim Vleeshhouwer.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago - 9 years 5 months ago #2 by kiwi
Replied by kiwi on topic List of sources
Get more memory?

Reduce /simplify the number of sources?

Read all the other posts on this forum about the same question?
Last edit: 9 years 5 months ago by kiwi.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #3 by Jackie
Replied by Jackie on topic List of sources
Hello Wim,

over than 200 sources and about 20 000 individuals, webtrees needs between 64MB-128MB to run ok.

Did you change memory in
Administration -> Site configuration -> Memory limit -> ?

By default, your server allows scripts to use xxxM of memory. You can request a higher or lower limit, although the server may ignore this request. If you leave this setting empty, the default value will be used.

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #4 by wimniny
Replied by wimniny on topic List of sources
How can I reduce the number of sources when I can't get to them??

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #5 by wimniny
Replied by wimniny on topic List of sources
The memory limit is set to 400Mb, can't change it, but that should be more than sufficient I should think.
This happened after I upgraded to 1.6.

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago - 9 years 5 months ago #6 by wimniny
Replied by wimniny on topic List of sources
Just got another error which prevents me from logging in, so I'm stuck. Now what?? What happened is that I tried to change the timeout, which obviously I should not have done.
How do I get back to where I can login again, do I have to reinstall WT again, or do I have to do some editing on files on my server? If so, would you please point me in the right direction of what I should do?

Thanks for all the support upto now!!

Regards, Wim.


ERROR 2: set_time_limit(): Cannot set time limit due to system policy
0 Error occurred on in function set_time_limit
1 called from line 386 of file session.php in function require
2 called from line 28 of file index.php
Warning: set_time_limit(): Cannot set time limit due to system policy in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/includes/session.php on line 386 Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Session must be started before any output has been sent to the browser; output started in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/includes/session.php/317' in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/library/bombayworks/zendframework1/library/Zend/Session.php:456 Stack trace: #0 /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/includes/session.php(472): Zend_Session::start(Array) #1 /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/index.php(28): require('/customers/c/0/...') #2 {main} thrown in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/library/bombayworks/zendframework1/library/Zend/Session.php on line 456
Last edit: 9 years 5 months ago by wimniny. Reason: added cause of problem

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
9 years 5 months ago #7 by bertkoor
Replied by bertkoor on topic List of sources
Hoi Wim,

Regarding your current issue with the timeout:
Maybe you can edit session.php and comment out line 386 where it tries to set the time limit.
Also please raise a bug report, so this gets the attention of Greg. Maybe he can fix this in the core code.

Regarding your original issue with sources: that's also a good candidate for a bug report.
Apparently the current code is not very scalable. Listing persons & families is optimised, but the list of sources is not.

stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #8 by wimniny
Replied by wimniny on topic List of sources
Hi Bert,
thanks for the replay, I will look at commenting that line out although that is not the preferred
solution. where can I change the timeout and what should it be?

also, I can not find how to raise a bug report.
regards, Wim.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
9 years 5 months ago #9 by bertkoor
Replied by bertkoor on topic List of sources

wimniny wrote: I will look at commenting that line out although that is not the preferred solution. where can I change the timeout and what should it be?


That's probably in the Admin panel, what you did before it broke. If you comment out that line, you can log in and fix it there. Then put back the .php file as it was.

wimniny wrote: also, I can not find how to raise a bug report.


Top of this page, under "Links": Bug Reporting

stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #10 by wimniny
Replied by wimniny on topic List of sources
Hi Bert,

Could you look at your admin and get the time-limit value (I think it is called that) from there? i do not know what it is originally set to and I can't have look as nothing works anymore.
Also, I do not speak PHP and therefore haven't a clue as to how to comment a line out in PHP.
Ragards, Wim.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago - 9 years 5 months ago #11 by Jackie
Replied by Jackie on topic List of sources
Hello Wim,

To comment out a line in php, suffice to add # at the beginning of the line
Code:
$max_execution_time=WT_Site::getPreference('MAX_EXECUTION_TIME'); if ($max_execution_time && strpos(ini_get('disable_functions'), 'set_time_limit')===false) { set_time_limit($max_execution_time);

by:
Code:
# $max_execution_time=WT_Site::getPreference('MAX_EXECUTION_TIME'); # if ($max_execution_time && strpos(ini_get('disable_functions'), 'set_time_limit')===false) { # set_time_limit($max_execution_time);

The default time limit is 60 sec. Enter just 60 in the field

EDIT : see your Administration -> Configuration -> PHP info -> go down in that page until you see CORE in the middle of the page. In that section, you should see two columns of max_execution_time
The left column is your webtrees installation value and the right column is the value of the server allowed by your webhost
Last edit: 9 years 5 months ago by Jackie.

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 5 months ago #12 by wimniny
Replied by wimniny on topic List of sources
Hi Bert and Jackie.

I tried, but I can't get it to work mostly because when I try to edit it, there are no linenumbers, so I do not know where to stop.

Also I got this error message when I started WT:
Parse error: syntax error, unexpected '}' in /customers/c/0/0/vleeshhouwer.nl/httpd.www/webtrees/includes/session.php on line 388

I think I will reinstall WT, and import the Gedcom which I downloaded beforehand.
Too bad, but I do not see any other way of getting it going again.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #13 by fisharebest
Replied by fisharebest on topic List of sources
webtrees only sets the timeout when you tell it to do this.

If you leave the option empty, webtrees will use your server's defaults.

You can also delete this setting in the wt_site_setting table.

ERROR 2: set_time_limit(): Cannot set time limit due to system policy


webtrees checks whether the set_time_limit() function has been disabled. Your server has disabled the function, but not added it to the list of disabled functions.

Therefore when webtrees asks PHP if the function is available, PHP is replying yes...

Listing persons & families is optimised, but the list of sources is not.


The problem is that for each source we display the count of linked individuals/families/etc. This requires that we check the privacy of linked individuals/families.

It is not really a bug, as webtrees is working exactly as designed.

We could change the design. Options include:
1) ignoring privacy when counting linked records.
2) not showing the counts of linked records.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #14 by dirk
Replied by dirk on topic List of sources

fisharebest wrote: We could change the design. Options include:
1) ignoring privacy when counting linked records.
2) not showing the counts of linked records.


I vote for changing the design. I do not have that large a genealogy, but I have sources for most facts. As a consequence, the source list now retrieves and analyses the privacy of almost every person and family in my genealogy, to show a list with only source titles and a reference count.

The reference count is interesting information on the relevance of a source, even if some of the persons or families can not be shown for privacy reasons. But their privacy is not invaded by counting them anonymously. Therefor I prefer option one.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #15 by JustCarmen
Replied by JustCarmen on topic List of sources

fisharebest wrote: We could change the design. Options include:
1) ignoring privacy when counting linked records.
2) not showing the counts of linked records.


Isn't it also possible to just load the contents of the current source page and retrieve the next pages from the database when clicked? This is the way for example the user table in admin is designed. That will reduce memory size.


Carmen
Designer of the JustLight theme (comes with a light and dark color palette), Fancy Imagebar, Fancy Research Links and Fancy Treeview for webtrees 2


Check my website at www.justcarmen.nl

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #16 by fisharebest
Replied by fisharebest on topic List of sources

Isn't it also possible to just load the contents of the current source page and retrieve the next pages from the database when clicked? This is the way for example the user table in admin is designed. That will reduce memory size.


You might still have problems if you filter/search for sources matching "census". Over half the records in my tree are linked to a census.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • wimniny
  • Topic Author
  • Visitor
  • Visitor
9 years 3 months ago #17 by wimniny
Replied by wimniny on topic List of sources
I am very glad that Greg is picking this up, hopefully it will soon work again. I am just interested in what sources I have and whether I can merge some of them. Also I would like to add email or webaddresses to the ones I haven't done this with.

Regards, wim.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #18 by dirk
Replied by dirk on topic List of sources
As far as I can read php, memory usage would be reduced by simply not caching every individual/family that is viisited to check for privacy, before adding it to the count. Execution time would not profit from that, but the list it would be produced.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #19 by fisharebest
Replied by fisharebest on topic List of sources

As far as I can read php, memory usage would be reduced by simply not caching every individual/family that is viisited to check for privacy, before adding it to the count. Execution time would not profit from that, but the list it would be produced.


If we ignore privacy, we can perform the count entirely in SQL, which is very fast, and uses no memory. e.g.

SELECT l_to, COUNT(i_id) FROM wt_individuals JOIN wt_link ON (l_file = i_file AND l_from = i_id) WHERE i_file = 3 AND l_type='SOUR' GROUP BY l_to

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #20 by dirk
Replied by dirk on topic List of sources
That is indeed why I voted for your option 1.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}