May 21, 2013, 22:58:36
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
URD Forum
>
General Category
>
Technical Problems
>
Memory exhausted
Pages: [
1
]
2
« previous
next »
Print
Author
Topic: Memory exhausted (Read 5397 times)
fusa
Posts: 23
Memory exhausted
«
on:
July 15, 2010, 17:15:58 »
I am getting this error in step 3/6 when trying to set up URD 1.05 "Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3 bytes) in /usr/share/urd/functions/autoincludes.php on line 73 " I originally set the memory_limit for PHP to 128M and got this error, tried 256M and received the same, then tried 512, and also got the error.
«
Last Edit: July 15, 2010, 17:32:41 by fusa
»
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #1 on:
July 15, 2010, 18:01:11 »
Which version of php and OS do you use?
It looks like exception is not enabled in your php install.
can you run this on the command line
Code:
php -r "throw new exception ('foo');"
It should render something like this:
Code:
Fatal error: Uncaught exception 'Exception' with message 'foo' in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #2 on:
July 15, 2010, 18:03:47 »
You may also try to add
echo "$class\n";
to
function/autoincludes.php
in the function
function urd_autoload($class)
after line 32; (before the switch)
It prints which class it tries to autoinclude. Post the output of it here pls
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #3 on:
July 15, 2010, 19:02:21 »
I'm using PHP version:
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
on Ubuntu 10.04
Code:
php -r "throw new exception ('foo');"
gave:
Code:
Fatal error: Uncaught exception 'Exception' with message 'foo' in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
Adding echo "$class\n"; gave the following:
Code:
ADORecordSet_ext_empty
ADORecordSet_ext_empty
ADORecordSet_ext_empty
...........
ADORecordSet_ext_empty
ADORecordSet_ext_empty
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20 bytes) in /usr/share/urd/functions/autoincludes.php on line 74
«
Last Edit: July 15, 2010, 19:07:26 by fusa
»
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #4 on:
July 15, 2010, 21:44:24 »
Ok this seems to be an issue with adodb. What database type are you trying to use?
A quick google on the class seems to say that using mysql
i
will fix this instead of plain mysql.
Weird tho I don't get this error. And the same setup really.
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #5 on:
July 15, 2010, 21:51:22 »
In any case, I'd like to find out what goes wrong
could you replace the earlier echo with
Code:
if ($class == 'ADORecordSet_ext_empty') debug_print_backtrace();
and post the output here?
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #6 on:
July 15, 2010, 22:43:42 »
The output is the following repeated several times:
Code:
#0 urd_autoload(ADORecordSet_ext_empty)
#1 spl_autoload_call(ADORecordSet_ext_empty)
#2 class_exists(ADORecordSet_ext_empty) called at [/usr/share/urd/functions/adodb/adodb.inc.php:1048]
#3 ADOConnection->_Execute(SET sql_mode='ANSI_QUOTES', ) called at [/usr/share/urd/functions/adodb/adodb.inc.php:1015]
#4 ADOConnection->Execute(SET sql_mode='ANSI_QUOTES', ) called at [/usr/share/urd/functions/db.class.php:406]
#5 DatabaseConnection->execute_query(SET sql_mode='ANSI_QUOTES') called at [/usr/share/urd/functions/db.class.php:379]
#6 DatabaseConnection->connect() called at [/usr/share/urd/functions/db.class.php:101]
#7 DatabaseConnection->__construct(mysql, localhost, user, password, urddb, 1) called at [/usr/share/urd/install/install.4.inc.php:169]
#8 include(/usr/share/urd/install/install.4.inc.php) called at [/usr/share/urd/install/install.php:207]
#0 urd_autoload(ADORecordSet_ext_empty)
#1 spl_autoload_call(ADORecordSet_ext_empty)
#2 class_exists(ADORecordSet_ext_empty) called at [/usr/share/urd/functions/adodb/adodb.inc.php:1048]
#3 ADOConnection->_Execute(SET sql_mode='ANSI_QUOTES', ) called at [/usr/share/urd/functions/adodb/adodb.inc.php:1015]
#4 ADOConnection->Execute(SET sql_mode='ANSI_QUOTES', ) called at [/usr/share/urd/functions/db.class.php:406]
#5 DatabaseConnection->execute_query(SET sql_mode='ANSI_QUOTES') called at [/usr/share/urd/functions/db.class.php:379]
#6 DatabaseConnection->connect() called at [/usr/share/urd/functions/db.class.php:409]
#7 DatabaseConnection->execute_query(SET sql_mode='ANSI_QUOTES') called at [/usr/share/urd/functions/db.class.php:379]
#8 DatabaseConnection->connect() called at [/usr/share/urd/functions/db.class.php:101]
#9 DatabaseConnection->__construct(mysql, localhost, user, password, urddb, 1) called at [/usr/share/urd/install/install.4.inc.php:169]
#10 include(/usr/share/urd/install/install.4.inc.php) called at [/usr/share/urd/install/install.php:207]
I am using MySQL, the only options I have is MySQL, MySQL with transactions, and MySQL Improved. with Transactions also fails with the same errors, Improved gives a different error page.
«
Last Edit: July 15, 2010, 23:10:59 by fusa
»
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #7 on:
July 15, 2010, 23:26:56 »
Interesting.... I don't understand it yet tho... I'll look into it. Looks like some weirdness with adodb
what error do you get with mysqli?
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #8 on:
July 15, 2010, 23:40:38 »
Using MySQL Improved:
Code:
Storing default usenet servers
Failed
Could not execute SQL query "INSERT INTO usenet_servers ("name", "hostname", "port", "secure_port", "threads", "connection", "authentication", "username", "password", "priority", "retention", "compressed_headers", "posting") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" Could not execute SQL query "INSERT INTO usenet_servers ("name", "hostname", "port", "secure_port", "threads", "connection", "authentication", "username", "password", "priority", "retention", "compressed_headers", "posting") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" mysqli error: [1146: Table 'urddb.usenet_servers' doesn't exist] in EXECUTE("INSERT INTO usenet_servers ("name", "hostname", "port", "secure_port", "threads", "connection", "authentication", "username", "password", "priority", "retention", "compressed_headers", "posting") VALUES ('4usenet', 'news.4usenet.nl', 119, 563, 6, 'ssl', 1, 'XXXXXXX', 'XXX', 0, 0, 0, 0)")
Storing default search buttons
Failed
Could not execute SQL query "INSERT INTO searchbuttons ("name", "image_url", "search_url") VALUES (?, ?, ?)" Could not execute SQL query "INSERT INTO searchbuttons ("name", "image_url", "search_url") VALUES (?, ?, ?)" mysqli error: [1146: Table 'urddb.searchbuttons' doesn't exist] in EXECUTE("INSERT INTO searchbuttons ("name", "image_url", "search_url") VALUES ('All4Divx', 'buttons/btn_all4divx.png', 'http://www.all4divx.com/subtitles/$q/any/1')")
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #9 on:
July 15, 2010, 23:46:30 »
I just tried manually importing URD_mysql_db.sql then using MySQLi and was able to get to step 5/6 and 6/6
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #10 on:
July 15, 2010, 23:50:28 »
Looks like connecting to the database doesn't work properly. Have you modified any rights in mysql perhaps?
Can you try to log into mysql and running a query by hand, using the credentials in the file dbconfig.php in the urd dir?
Code:
mysql -u urduser -p urddb
(urduser and urddb are the username and database name resp)
then run
Code:
SET sql_mode='ANSI_QUOTES'
insert into stats (userid, action, value) values (2,1,1);
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #11 on:
July 16, 2010, 00:12:51 »
I get
Code:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into stats (userid, action, value) values (2,1,1)' at line 2
Code:
SET sql_mode='ANSI_QUOTES';
insert into stats (userid, action, value) values (2,1,1);
worked fine, (adding the ; at the end of the first line).
When trying to configure URD I am unable to add new servers, I use Newshosting. When navigating away from the URD page, I am unable to use URD anymore unless I remove the .installed file, empty the database and start over.
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #12 on:
July 16, 2010, 00:18:00 »
The following is what I get whenever I navigate to localhost/urd
Code:
Fatal error: Uncaught exception 'Exception' with message '('default_language')' in /usr/share/urd/functions/functions.php:449 Stack trace: #0 /usr/share/urd/functions/checkauth.php(57): get_config(Object(DatabaseConnection), 'default_languag...') #1 /usr/share/urd/html/index.php(51): require_once('/usr/share/urd/...') #2 {main} thrown in /usr/share/urd/functions/functions.php on line 449
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #13 on:
July 16, 2010, 09:04:42 »
It looks like the database isn't working as it should. Possibly a rights issue on the tables somewhere.
If you don't use mysql for anything else, it might be worth trying to do a complete reinstall of mysql.
sudo apt-get purgre mysql
(be sure to remove /etc/mysql/my.ini as well)
alternatively, you might wanna use the root username in the installer for the "Database username" (and password). Do not set the "Delete existing database" option, but drop the table manually from the console or try a different database name.
(the missing semicolon was my mistake)
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #14 on:
July 16, 2010, 09:31:00 »
I have already tried using my root user which results in the same problems. For some reason some of the functions of URD just do nothing. For example clicking on the icon to start URD daemon does nothing. When trying to select a group to subscribe to does nothing (just gives a message empty value). The only way I was able to connect to my news server was manually adding the values in the database, and removing the servers I didn't use. I have tried using both Firefox and Opera, both have the same results. I use MySQL for several other applications, so don't want to remove and reinstall.
The way I was successfully able to get through the 6 initial steps was to use urd as user name, set the password, and the root user, and password and use mysqli. Just using the root user as the database user resulted in errors, and anythign other than mysqli also did too. After that I edited dbconfig.php and changed the user to the root user, and used phpmyadmin to manually add my news server. I tried manually subscribing to some groups, and was partially successful, but didn't know what to set for values to tell it when to update.
here are some more errors from /tmp/urdd.log:
Code:
Jul 15 19:55:10 server.com urdd: INFO using authentication as user
Jul 15 19:55:10 server.com urdd: NOTICE Selecting group: alt.binaries.emulators.misc
Jul 15 19:55:12 server.com urdd: ERROR Error while updating alt.binaries.emulators.misc: Could not execute SQL query "LOCK TABLE parts_3324 write" mysqli error: [1146: Table 'urddb.parts_3324' doesn't exist] in EXECUTE("LOCK TABLE parts_3324 write")
Jul 15 19:55:12 server.com urdd: ERROR (0)
Jul 15 19:55:13 server.com urdd: INFO Connecting to NNTP server: ssl:news.newshosting.com:563
Jul 15 19:55:15 server.com urdd: INFO using authentication as user
Jul 15 19:55:15 server.com urdd: NOTICE Selecting group: alt.binaries.emulators.misc
Jul 15 19:55:17 server.com urdd: ERROR Error while updating alt.binaries.emulators.misc: Could not execute SQL query "LOCK TABLE parts_3324 write" mysqli error: [1146: Table 'urddb.parts_3324' doesn't exist] in EXECUTE("LOCK TABLE parts_3324 write")
«
Last Edit: July 16, 2010, 09:40:37 by fusa
»
Logged
Styck
Administrator
Posts: 125
Re: Memory exhausted
«
Reply #15 on:
July 16, 2010, 16:23:55 »
I think when a group is subscribed, there are some tables that are generated.
Code:
mysql> describe parts_60
-> ;
+------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+----------------+
| ID | bigint(16) unsigned | NO | PRI | NULL | auto_increment |
| binaryID | varchar(32) | NO | MUL | | |
| messageID | varchar(255) | NO | | | |
| subject | varchar(512) | NO | | | |
| fromname | varchar(512) | NO | | | |
| date | int(16) unsigned | YES | | 0 | |
| partnumber | int(16) unsigned | NO | | 0 | |
| size | int(16) unsigned | NO | | 0 | |
| groupID | bigint(16) unsigned | NO | | 0 | |
| dirty | smallint(6) | NO | MUL | 0 | |
+------------+---------------------+------+-----+---------+----------------+
10 rows in set (0.09 sec)
mysql> describe binaries_60;
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| binaryID | varchar(32) | NO | PRI | NULL | |
| subject | varchar(512) | NO | | | |
| fromname | varchar(512) | NO | | | |
| date | int(16) unsigned | YES | | 0 | |
| bytes | bigint(16) unsigned | NO | | 0 | |
| totalParts | int(16) unsigned | NO | | 0 | |
| setID | varchar(50) | YES | MUL | 0 | |
| dirty | smallint(6) | NO | MUL | 0 | |
+------------+---------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
mysql> select * from groups where ID = '60';
+----+-----------+---------------------+-------------+--------------+--------+-------------+-----------+--------+--------------+----------------+--------------+------------+---------------+
| ID | server_ID | name | last_record | last_updated | active | description | postcount | expire | refresh_time | refresh_period | first_record | mid_record | extset_update |
+----+-----------+---------------------+-------------+--------------+--------+-------------+-----------+--------+--------------+----------------+--------------+------------+---------------+
| 60 | 0 | alt.binaries.movies | 50959898 | 1279242930 | 1 | | 324970 | 5 | 195 | 2 | 19770491 | 19770491 | 1279281600 |
+----+-----------+---------------------+-------------+--------------+--------+-------------+-----------+--------+--------------+----------------+--------------+------------+---------------+
1 row in set (0.00 sec)
But basically you should try to do this from the GUI
First thing to do is to get the URD daemon running. Try starting it from the command line with ./urdd_sh and see what happens.
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #16 on:
July 16, 2010, 18:09:24 »
Running it from command line it starts ok. When I tried generating sets for all newsgroups, I received:
Code:
Jul 16 12:02:51 server.com urdd: INFO Connecting to NNTP server: ssl:news.newshosting.com:563
Jul 16 12:02:53 server.com urdd: INFO using authentication as user
Jul 16 12:02:53 server.com urdd: NOTICE We are started as root. Dropping priviliges
Jul 16 12:02:53 server.com urdd: NOTICE Dropping priviliges to group urd
Jul 16 12:02:53 server.com urdd: NOTICE Dropping priviliges to user urd
Jul 16 12:04:37 server.com urdd: INFO Connecting to NNTP server: ssl:news.newshosting.com:563
Jul 16 12:04:38 server.com urdd: INFO using authentication as user
Jul 16 12:04:38 server.com urdd: NOTICE Getting grouplist from server.
Jul 16 12:04:45 server.com urdd: NOTICE Done with grouplist from server. Inserted 0, Updated 7040
Jul 16 12:05:03 server.com urdd: WARNING Child Died? Could not execute SQL query "DELETE FROM parts_3324 WHERE "date" < 1278864303 " mysqli error: [1146: Table 'urddb.parts_3324' doesn't exist] in EXECUTE("DELETE FROM parts_3324 WHERE "date" < 1278864303 ")
Jul 16 12:05:03 server.com urdd: WARNING
Jul 16 12:05:03 server.com urdd: WARNING Child Died? Could not execute SQL query "SELECT count("binaryID") AS cnt FROM binaries_3324 WHERE "date" < 1278864303 " mysqli error: [1146: Table 'urddb.binaries_3324' doesn't exist] in EXECUTE("SELECT count("binaryID") AS cnt FROM binaries_3324 WHERE "date" < 1278864303 ")
Jul 16 12:05:03 server.com urdd: WARNING
Logged
Styck
Administrator
Posts: 125
Re: Memory exhausted
«
Reply #17 on:
July 16, 2010, 21:35:17 »
That's because you don't have the parts tables.
That's the reason I pasted the details of said tables earlier
You'll have to manually create them, but if URDD starts I recommend you try adding a newsgroup in the webinterface and see if that works.
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #18 on:
July 16, 2010, 21:47:09 »
when I try adding through the web interface, it just pops up a window that says "Not a number"
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #19 on:
July 16, 2010, 22:01:46 »
If you select a update period you also have to set the time for it.
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #20 on:
July 17, 2010, 00:07:42 »
Do you have this ubuntu package installed perhaps : php5-adodb
Code:
dpkg -l |grep php5-adodb
If so try and remove it and see if that works.
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #21 on:
July 17, 2010, 18:17:15 »
I tried selecting both hourly, and setting a time, both gave that error
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #22 on:
July 19, 2010, 05:43:31 »
After a complete removal of URD and reinstall, it seems to be working correctly.
I do have a couple of questions, is the max number of days articles kept in the database 365 days? My provider has 600 day retention, but selecting that resulted in a bogus expire setting message.
Also I am a little confused about the automatic updates and @time settings. I have selected automatic updates hourly, but what should I have for @time? is this minutes:seconds? If its hour:minutes, does it ignore the hour part and just update at the :minutes? For example if I set hourly, and for @time 1:15 will updated be at 12:15, 1:15, 2:15 etc?
Logged
spearhead
Administrator
Posts: 1038
Re: Memory exhausted
«
Reply #23 on:
July 19, 2010, 08:39:19 »
Good to hear it is working! Any idea what you changed?
The max is set by default to 365 indeed. You can alter it in admin/config. You may have to raise you user experience level first tho (preferences). Note that this will impact on the size of the database and essentially the speed of URD.
the @time is in H:m format. it will do its first action on that time and then every period you select. So if you say 17:15 and hourly, it will start its first update at 17:15 and then do it one hour later, then another hour later and so on.
«
Last Edit: July 19, 2010, 09:15:01 by spearhead
»
Logged
fusa
Posts: 23
Re: Memory exhausted
«
Reply #24 on:
July 19, 2010, 15:59:37 »
First time I tried to install, I had to install a couple of other apps to continue (yencode, and the subtitles downloader) Then I ran into lots of problems trying to use MySQL, with MySQLI eventually working. Then at the step where you set the login for URD, I used a password with less than 8 characters, and had to set another login using a better password.
This working install I used the same settings, so I'm not sure what is different. Maybe at the stage where I set the password something was not done correctly. Its possible I restarted installation to use the login I wanted to use originally. Is this information set in the database? I did drop the database a couple of times, but that might have been when I was having problems selecting MySQL.
I wish I could give better information of what made it work, but not really sure. Thanks for your help.
Logged
Pages: [
1
]
2
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
=> Recruitment
=> Technical Problems
=> Features
Loading...