Archive
INN Problem with History File over 2GB
If your INN distribution is not compiled with large file support (and your file system does not support files over 2GB) innd can die unexpectedly whenever your history file gets over 2GB. You can locate your history file under pathdb (/var/lib/news for me). If it is over 2GB you can change remember settings to a lower value to decrease the size of the history file.
To do so, edit your expire.ctl and change the remember setting to a lower value (5 days for me) and run makehistory and makedbz to rebuilt the files. Now, check your history file size and verify that it is below 2GB. You can run your innd properly now.
INN 2.5 configuration tips
Been busy configuring an INN 2.5 setup to get header feeds for Newzbox.com, I have a small list of tips to configure INN.
It seems that CNFS is ideal for storing large numbers of posts. Looking at the man page, it can be configured by editing cycbuff.conf file in /etc/news. You need to add lines to configure CNFS files and metadata like this.
1 2 | cycbuff:CYC01:/home/news/cycbuff1:2097151 metacycbuff:HEADERS:CYC01 |
This enables using a file at /home/news/cycbuff1, sized 2097151 Kbytes (2GB is the limit on some systems, and 2GB would be quite sufficient for me now). And by creating a metadata definition named HEADERS, we enable this CNFS file (CYC01) to be used in storage.conf.
We should now edit the storage.conf file to use this HEADERS CNFS files. The lines below tells INN to use it for binaries groups. For all other groups you should add another CNFS file,or maybe a timehash file to store that groups.
1 2 3 4 5 | method cnfs { class: 1 newsgroups: *.binaries.* options: HEADERS } |
After finishing all configuring stuff, you can reload the server via;
1 | /usr/lib/news/bin/ctlinnd reload all reason |
But after editing inn.conf and storage.conf files you need to restart innd by the command below.
1 | /usr/lib/news/bin/ctlinnd xexec innd |
To configure the feed host you need to edit incoming.conf file, and add the lines below.
1 2 3 4 5 | peer <myfeed> { hostname: feedhost.com streaming: true max-connections: 10 } |
And to add groups to capture, you need to first throttle the server, add the group and start the server again.
1 2 3 | /usr/lib/news/bin/ctlinnd throttle reason /usr/lib/news/bin/ctlinnd newgroup alt.binaries.boneless /usr/lib/news/bin/ctlinnd go reason |
You can use the command below to get the status of CNFS files.
1 | /usr/lib/news/bin/cnfsstat |
And the command below to get an overall status of the INN.
1 | /usr/lib/news/bin/innstat |
Fresh ideas for Sheet Music Trade
After a field research process I made a list of new ideas and tweaks that I should complete before starting any actions that make the site reach to the masses. Without giving up many details I can say that the list includes more Youtube integration,
more user interaction and user generated content. I would like to hear your opinions about the site, feel free to contact me.
Getting selected values of an checkbox array with JQuery
With JQuery it is extremely easy to collect the checked values of an checkbox array. You can use the code below to collect checked items of an array named “itemSelect[]” and give an alert if none of them are checked. This code submits the collected data via ajax to “/ajax_do_something.php” to process the data. If sucessfully processed it refreshes the page to display new data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | var selectedItems = new Array(); $("input[@name='itemSelect[]']:checked").each(function() {selectedItems.push($(this).val());}); if (selectedItems .length == 0) alert("Please select item(s) to delete."); else $.ajax({ type: "POST", url: "/ajax_do_something.php", data: "items=" + selectedItems.join('|'), dataType: "text", success: function (request) { document.location.reload(); }, error: function(request,error){ alert('Error deleting item(s), try again later.'); } } ) |













Burc Sade (aka laforge) is a full time application developer (mainly web applications), part time entrepreneur located in Istanbul, Turkey. This site is his blog about the projects going on, little programming tricks, Internet, travel, photography and other bits and pieces.