View · Index

Weblog

Showing 221 - 230 of 694 Postings (summary)

PostgreSQL Administration

Created by OpenACS community, last modified by Gustaf Neumann 13 Jun 2017, at 10:27 AM

Finding and fixing expensive queries

Probably the most important thing you can do to improve performance is rewriting queries to run quickly. Explain analyze is your friend. OpenACS also includes tools to track down slow queries, and you can ask PostgreSQL to give you information about queries as well.

First you should install the acs-developer-support package on a development or staging server. In general its not a good idea to keep the develop support tracking features running constantly on a production system, but you can turn it on temporarily to diagnose a problem on a production system. Once Developer Support is installed you can visit /ds/ on your site and turn on the developer support toolbar and database statistics. This will give you a total of the time for all queries for a page in the toolbar at the top of the page. If you click on the timing information you can see a page that lists every query run for that page. It should be easy to spot the slow running query in the list.

Once you find the slow running query you can copy it to your clipboard. Next you want to open a psql session on the database server, or use M-x sql-postgres most in emacs. Type "explain analyze" and paste the query after that. This will tell PostgreSQL to run the query and show the query plan it will use.  The first thing to look for is a "Sequential Scan" on a large table. If the table is small (hundreds instead of thousands of rows, for example)  it is probably cheaper to scan the table than to load an index, but on large tables like "acs_objects". "users", "cr_items", a sequential scan is a sign of trouble.

PostgreSQL does not seem to generate good plans if you do a join with a view. In this case you should try to recreate the query using the tables in the view explicitly. This can speed up many queries. A common example is the cc_users view, or the cr_revisionsx view or the (x) view automatically created for subtypes of cr_revisions.

If you can't figure out why the query plan is slow, post it somewhere on the OpenACS forums or ask for advice in the #openacs irc channel. (https://openacs.org/irc/) 

This will help you is you know which page is slow. If you don't know which is slow, but notice a high load on PostgreSQL on your server. You'll need to turn on the stats collector and command string collector in PostgreSQL. In the postgresql.conf file set

   stats_start_collector true

and

   stats_command_string true

and then do /etc/init.d/postgreql reload or pg_ctl reload to turn it on.

Once this is on you can execute "select * from pg_stat_activity" to see if there are any long running queries. Most queries will finish too quickly to notice in this table. The table includes the start time of the query and the process id of the backend executing the query. Sometimes you'll find a particularly bad query has been running for a very long time. Sometimes hours. If this happens you can stop the query by issuing a SIGINT signal to the process of the backend that is running that query. This will execute a cancel request to the backend and is the only safe way to stop a long running query. Do not kill the process or try to stop AOLserver. If you stop AOLserver the query will continue to run in the PostgreSQL backend process.

Tuning PostgreSQL

Tune PostgreSQL. (OPTIONAL). The default values for PostgreSQL are very conservative; we can safely change some of them and improve performance.

  1. Change the kernel parameter for maximum shared memory segment size to 128Mb: DAVEB: How current is this? Do modern 2.4 or 2.6 kernels have such low settings? This is highly dependent also on the amount of RAM on your server, most servers have gigabytes of RAM so adjust accordingly.

    [root root]# echo 134217728 >/proc/sys/kernel/shmmax
    [root root]#

    Make that change permanent by editing /etc/sysctl.conf to add these lines at the end:

    # increase shared memory limit for postgres
    kernel.shmmax = 134217728
  2. Edit the PostgreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information

    #       Shared Memory Size
    #
    shared_buffers = 15200      # 2*max_connections, min 16
    
    #       Non-shared Memory Sizes
    #
    sort_mem = 32168            # min 32
    
    
    #       Write-ahead log (WAL)
    #
    checkpoint_segments = 3     # in logfile segments (16MB each), min 1
    

    Restart postgres (service postgresql restart) or (/etc/init.d/postgres restart) so that the changes take effect.

Performance tuning resources:

more information about PostgreSQL

Vacuuming multiple databases

If you are frequently creating and dropping various databases, using this in your crontab can help simplify setup:

vacuumdb --all --verbose

 Debugging queries

You can work directly with the database to do debugging steps like looking directly at tables and testing stored procedures. Start emacs. Type M-x sql-postgres. Press enter for server name and use $OPENACS_SERVICE_NAME for database name. You can use C-(up arrow) and C-(down arrow) for command history.

Hint: "Parse error near *" usually means that an xql file wasn't recognized, because the Tcl file is choking on the *SQL* placeholder that it falls back on.

*nix operating system

Created by OpenACS community, last modified by Gustaf Neumann 13 Jun 2017, at 10:24 AM

*nix operating systems

OpenACS works on most any operating system that behaves in a manner similar to UNIX. (see "Unix-like" by Wikipedia). For example: (links to features lists of OSes)

YUI Project

Created by Ryan Gallimore, last modified by Gustaf Neumann 11 Jun 2017, at 10:33 AM

Notes on an OpenACS wrapper for YUI

  • There is some consensus to use YUI over other JS libraries, e.g. jQuery.
  • Use most complete version - YUI library
  • YUI Loader for dynamic loading.  Each wrapper function in OpenACS loads only the YUI components that it needs.  This is preferable to sending the full 250 KB gzipped library for every page.
  • Download YUI sources from package directory or Yahoo's CDN.
  • Always combine sources into one HTTP download if using CDN
  • UI tests (Selenium IDE/RC) should be written for all wrappers to facilitate testing during development and when YUI is upgraded.
  • Wrappers will be defined by specific tasks like perform an AJAX request and return the response into a div.  The wrapper will take care of loading all required sources into the page.

YUI Theme [Suggestion]

 

 

  • Provide a package openacs-theme-yui, which is based on the YUI CSS Foundation

nlunt: A word of warning regarding YUI Loader:
While it sounds like a good idea to load only the modules that are needed, my experience has shown that there may be more benefit to loading a single gzipped file for the javascript and css portions of YUI for a total of 250K that is cached after the first load. This sounds like a lot to load for every page, however, loading just the base modules of YUI may exceed that amount because the individual JavaScript and css files for each module are not gzipped. Loading all of YUI uncompressed is about 1M, so there is considerable benefit in loading the files compressed.

OpenACS/dotLRN Windows Installer Instructions

Created by Byron Linares, last modified by Maurizio Martignano 07 Jun 2017, at 05:34 PM

NOTE: Currently (06/2017), the best option to get OpenACS 5.9.* running on Windows is to use the native windows installation Windows-OpenACS by Spazio IT (Maurizio Martignano).


This page describes the installation of (quite old) components based on cygwin, but might still be useful for people, that can't use Maurizio's implementation for whatever reason:

  • OpenACS 5.2.3
  • DotLRN 2.2.0

Included Software

  • AOLServer 4.0.beta10_2003
  • PostgresSQL 7.4.3
  • OpenACS 5.2.3
  • DotLrn 2.2.0
  • Cygwin

Installer Download :

The installer is available in openacs community page.
Available versions:
 

  • OpenACS/dotLRN installer
  • OpenACS 5.2.0 installer


Installation Instructions:

Run the "OpenACS/DotLRN Installer" called setup.exe, read the license document before continuing, the installer will ask for some information, this will be used to make the automatic installation.

There are to ways to install the components; manually or automatic

Components
 

  • dotLRN Manual and openACS Manual:
  • In this modality the entered personal data in the installer will be omitted and will be necessary to retake the installation from a browser window and enter the necessary data to continue the creation of the data modeling.
  • dotLRN Automatic and openACS Automatic
  • In this modality the installer its in charge of all the work, when finishing creating the data model the following step would be to reinitiate the service and continue with the use of the platform.
  • Source Code:
  • The installer will put in the installation folder the source code of the same one.


Select what you want to install and click next. After the installer places all the files, a browser window will be opened and the installation have to be continued from here, if the automatic mode has been selected wait to the installation finishes. When the installation finishes restart the server and type in a web browser "http://localhost"

 Access Icons:

  • OpenACS on the web: access to http://localhost/
  • Start Server: Bach file to initiate the server (aolserver, postgresql, cygwim)
  • Stop Server: Bach file to stop the server (aolserver, postgresql, cygwin)
  • Unistall OpenACS: Uninstall all

Diagnostics
 

  • Check if CygWin: Please execute the file server/cygwin/cygwin.bat.  You should get a black screen with some green text saying: "yourusername@yourcomputer" and the "$".
  • Check PostgreSQL: in the cygwin window typy psql -l , You should get the names of all data base.
  • Check AOLServer: ps -alW | grep nsd , You should get some thing like this
  • 2312 0 0 2312 ? 0 07:52:20 C:\OpenACS\nsd4\bin\nsd.exe


Full guide

 

 

developed at the Galileo University (www.galileo.edu) by Byron Haroldo Linares Roman bhlr@galileo.edu as part of the E-LANE project (www.e-lane.org)

 

 

related forum threads

OpenACS/dotLRN installer for MSWindows

Bulk Upload

Created by OpenACS community, last modified by Gustaf Neumann 07 Jun 2017, at 11:02 AM

Status

pre-release  (part of the ecommerce-g2 project)

Introduction

There is little consistency between packages for uploading data. Most packages do not offer an import feature. The current practice is to use the database import features directly. This also means creating small scripts or using intermediate applications to manipulate the data prior to import, and using shell commands to get the data into the right security context and location. Mistakes in the import usually have to be corrected with hand-written sql updates. A data importer likely needs to have admin level access and unix level competency, which is beyond the usual skill set required to manage a website application. A bulk-upload package would standardize and ease barriers to setting up and managing OpenACS packages.

Vision Statement

A package that provides standardized UI and import services for bulk uploading data (tables and lists) into existing tables of other packages

Requirements

  • provide import modes
    • insert rows with new keys only
    • update where rows already exist
    • report any unchanged rows?
    • ignore or error if importing a field not found in tables or specified sets
  • import to multiple tables from the same upload
  • option to print or log ignored or rejected rows/fields
  • use the status_bar feature, that tells when a file is uploaded, and when it is being processed (helps in cases where connection times out)
  • Use this framework to create a UI for managing ACS reference data ( en:acs-reference ) --importing, updating, editing, reporting. (for en:ecommerce-g2 )

Implementation Notes

see also: https://web.archive.org/web/20071007211200/http://jongriffin.com/articles/openacs-relevancy/

Exsiting ecommerce bulk upload of custom fields represents the most flexible at this point, because it handles inserts and updates, and builds the sql as well as uses the xql query files: https://raw.githubusercontent.com/openacs/ecommerce/master/www/admin/products/extras-upload-2.tcl

Perhaps a dumbed-down spreadsheet data model would work well, to allow for tables of most any number of columns or rows without having to create/expose code that modifies db tables.

DAVEB: In addition to any generic storage of imported data, I think it would be useful to support importing into specific storage tables. The easiest, best examples are the content repository, or dynamic types defined tables and views. There are Tcl apis to insert/update these tables and it makes sense to support this as well.

Don Baccus has other implementations which complement this and may provide an overall development path for a preliminary general bulk upload.

Feature requests

 

Installing OpenACS on FreeBSD with ports

Created by Gustaf Neumann, last modified by Gustaf Neumann 07 Jun 2017, at 10:28 AM

NEW:  For the impatient users there is a quick-and-dirty install guide for FreeBSD

OpenACS and .LRN are included in the current FreeBSD ports tree.
The ports are tested with FreeBSD production version 6.2-RELEASE, old stable 5.5-RELEASE and the development branch 7-CURRENT.

Installation requirements:

  1. FreeBSD operating system with root access rights.
  2. Installed and updated FreeBSD Ports Collection (for updating see Appendix A below)
    (alternative: installing from packages, see Appendix B)

To install OpenACS or .LRN from the FreeBSD ports tree, follow the instructions below.

1. Installing and configuring PostgreSQL

NOTICE: If you have a PostgreSQL server installed and running, skip to Section 2.

If you desire to use a local PostgreSQL server (most users do), install the server first.
We recommend using PostgreSQL version 8.2 from the databases/postgresql82-server port


 

# cd /usr/ports/databases/postgresql82-server # make install clean

 

NOTICE: As an alternative, you may install PostgreSQL server from a binary package. See Appendix B below

The plperl language is required for OpenACS/.LRN. This can be installed from the ports with the following commands:


 

# cd /usr/ports/databases/p5-postgresql-plperl # make install clean

To install the OpenACS/.LRN database, your PostgreSQL server must be running.
You need to enable it in your /etc/rc.conf (or /etc/rc.conf.local) by adding the following line:

postgresql_enable="YES"

After installing the PostgreSQL server, you have to initialize your data store:

# /usr/local/etc/rc.d/postgresql initdb

To start the PostgreSQL server, issue the following command:

# /usr/local/etc/rc.d/postgresql start

You can check if the server is up and running with:

# /usr/local/etc/rc.d/postgresql status

 

2. Installing OpenACS / .LRN

2.1 Installing the OpenACS or .LRN port 

OpenACS can be installed directly from the FreeBSD ports tree, www/openacs:

# cd /usr/ports/www/openacs
# make install clean

.LRN installation, www/openacs-dotlrn:

# cd /usr/ports/www/openacs-dotlrn
# make install clean

NOTICE: If you want to make changes to the default configuration, the AOLserver configuration files for OpenACS/.LRN files are located at:
/usr/local/openacs/etc/openacs-config.tcl
/usr/local/dotlrn/etc/dotlrn-config.tcl

NOTICE: If you installed both OpenACS and .LRN ports, you have to change the default port of one of the installations. See the configuration files in the previous notice.

 

2.2 Creating the OpenACS/.LRN database 

For this step, you require an installed and running PostgreSQL server (see Section 1) and installed OpenACS/.LRN (see Section 2.1)

First we need to adjust the PostgreSQL configuration (this applies for server versions 8.1.x and higher):

# /usr/local/share/doc/openacs/adjust_pgsql_conf.sh

or if .LRN was installed: 

# /usr/local/share/doc/dotlrn/adjust_pgsql_conf.sh

NOTICE: You can adjust the configuration manually (standard location: /usr/local/pgsql/data/postgresql.conf)
Please see en:How_to_install_in_Postgres_8.x.

The PostgreSQL server needs to be restarted after changing the configuration:

# /usr/local/etc/rc.d/postgresql restart

Next, we can create a default OpenACS database by running the following script:

# /usr/local/share/doc/openacs/create_sampledb.sh

To create a default .LRN database, run the following script:

# /usr/local/share/doc/dotlrn/create_sampledb.sh

 

 

2.3 Starting OpenACS/.LRN and finalizing installation 

To make use of the automatic startup script OpenACS/.LRN has to be enabled in /etc/rc.conf (or /etc/rc.conf.local):

openacs_enable="YES" 

 

or for .LRN:

dotlrn_enable="YES" 

To start OpenACS, use the following command:

# /usr/local/etc/rc.d/openacs start

To start .LRN, use the following command:

# /usr/local/etc/rc.d/dotlrn start

Now you can login to your OpenACS/.LRN system and finalize the installation.
The default port is 8000. URL:

http://<your-ip>:<port>

After filling your e-mail address, password and other important information OpenACS/.LRN gets installed, but the server stops.
You have to start it again (see above).

 A. Updating the FreeBSD ports tree

To get the latest versions of the OpenACS, .LRN and other FreeBSD ports, it is recommended to update the FreeBSD ports tree on a regular basis. The easiest way to to perform this task is using the portsnap(8) command.

For documentation, refer to the following FreeBSD Handbook chapters:
Using the Ports Collection
Using Portsnap

 

B. Installing from binary packages

PostgreSQL, OpenACS, .LRN and all dependent ports may be installed from binary packages, too.
This installation can be performed from a submenu of FreeBSD's sysinstall(8) command: Configure/Packages

OpenACS and .LRN are located in subcategory www, PostgreSQL is in subcategory databases.

 

C. Contact information and bug reporting

Please send bug reports and feature suggestions to the port maintainer of OpenACS/.LRN FreeBSD ports:
Martin Matuska <mm_at_FreeBSD_dot_org>

.LRN 2.4 Release Management

Created by Emmanuelle Raffenne, last modified by Gustaf Neumann 07 Jun 2017, at 09:32 AM

About

  • Current status: Released! (see the release notes)
  • Next release date: no further releases are planned for this version
  • Stable release: 2.4.1 released October 27th, 2008
  • Feature freeze and branch: March 11th, 2008

.LRN 2.4 will contain acs-core, dotlrn-all and dotlrn-extras packages. See Aliases at CVS for a detailed list of the packages included in those aliases.

Releases are coordinated by the .LRN Leadership Team.

Weekly technical meetings in IRC at openacs channel:

  • From March 31st to October 26th, 2008: Tuesdays at 16:00 GMT
  • From October 27th to December 31st: Tuesdays at 17:00 GMT

To do and goals

New features

  • HTML 4.01 Strict
  • WAI-AA compliant
  • file-storage: categorization (tested and worked as expected - vguerra)
  • views: oracle support
  • forums: read/unread per message and user ?

2.4.1 To-do List

Package What Who State
Forums Permissions. See forums for details -- pending
All Accessibility: see forums for details  emmar  DONE

2.4.0 To-do List

The table below lists the bug fixed for 2.4.0

Package/Topic What Who State
Accessibility A few improvements, see forums for details emmar DONE
Accessibility Color of the class portal doesn't pass the luminosity contrast test (ratio = 3:1, should be 5:1 for normal text) daveb FIXED
new-portal set default layout to theme-zen when a new page is added to a portal donb FIXED
 theme-selva fix CSS donb

FIXED (somewhat)

I fixed the basic portal layout and decoration stuff, nothing else.  If someone else cares about selva, please other css issues as you find them

forums message-view expand/collapse should toggle (but it's done in javascript so the page doesn't know what the current state is) or we should just delete the options as we did in 2.3.  Also the print button should disappear - print should be handled by linking the package's print.css file using media="print", with printing then handled by the browse as it is meant to be in this modern era. vguerra The proposed fix was incomplete (only one cookie value for all threads), feature will be removed from 2.4.  Victor can fix it in HEAD for a future release if he wishes to.
forums doesn't work for oracle donb FIXED
forums forums: the "new" tag in the forums portlet lasts longer than the "bold" mark of new messages in the forum page (forum-view) vguerra FIXED
forums when posting a message ( without previewing it ) part of the screen gets black  vguerra

xinha problem (core)

forums testing upgrade regarding the "readinginfo" new feature

marioa

emmar

DONE

file-storage file upload doesn't work for oracle  donb FIXED (CR in core)
lorsm failed because of the oracle port of views. emmar FIXED
dotlrn sending email to new members when added to a class/club seems to be broken (no email is sent out). nimam FIXED
dotlrn When renaming department and subject, the package instance pretty name is not edited so the old name still appears in the breadcrumbs morals FIXED
imsld error when applet added to a class (root folder missing) emmar FIXED (CR in core)
imsld

merge version from 5.3 to 5.4

derick DONE
assessment use form builder where it's possible and finish html 4.01 strict validation afterwards emmar DONE
chat missing upgrade script (from downgrade between 2.3.0 and 2.3.1) emmar/avni FIXED
sending email check and test with the new acs-mail-lite send proc (bulk-mail, forum, evaluation, imsld, etc.) emmar DONE
breadcrumbs

Usability:

  • breadcrumbs should start from dotLRN root node instead of the main site.
  • dotlrn root node should be labelled as "Home".
  • The portal page name should appear in the breadcrumbs
  • last element of the breadcrumbs should match the title of the page
emmar DONE
lorsm

This addition

cvs diff -r 1.5 -r 1.6 lorsm-create.sql

Needs an upgrade script

daveb DONE

Others:

.LRN Board of Directors

Created by Rocael Hernández Rizzardini, last modified by Gustaf Neumann 07 Jun 2017, at 09:28 AM

.LRN 2007 Board of Directors

 After the nomination process, the current elected board:

(1 year term: 1/nov/2006 - 31/oct/2007) 

  • Jesus G. Boticario (UNED)
  • Carl Robert Blesius (HMS)
  • Rocael Hernandez (Galileo University)
  • Caroline Meeks (Solution Grove)
  • Carlos Delgado (UC3M)
  • Cesar Brea (Monitor)
  • Gustaf Neumann (WU Wien)

Check the dotLRN governance.

Contact the board: board @t dotlrn dot org. 

 

 

.LRN Educational standards support

Created by Olga C. Santos, last modified by Gustaf Neumann 06 Jun 2017, at 11:53 PM

.LRN supports several educational standards in the following packages:

  • LORS: expands .LRN to incorporate IMS Metadata (IMS-MD 1.2.1) and IMS Content Packaging (IMS-CP 1.1.4) specifications as well as ADL SCORM extensions (SCORM 1.2).
  • Assessment: import IMS-QTI 1.2.1 zip files to create an assessment or export an assessment into IMS-QTI 1.2.1.
  • IMS-LD: plays IMS-LD units of learning (UoLs), and is integrated with ADL SCORM, IMS QTI and the .LRN forums. Information about the last stable release can be read in this link. The release was announced here.
  • IMS Enterprise: handle any IMS Enterprise v.1.1 XML document and reflect all the respective data into .LRN.

Both Assessment and LORS are part of dotLRN 2.2.0 and IMS-LD and IMS-Enterprise can be downloaded via the APM package manager.

Last modified: 2017-06-06 23:53:48.516768+02

Javascript Toolbox

Created by Robert Taylor, last modified by Gustaf Neumann 06 Jun 2017, at 09:23 AM

This is a very interesting  website with a lot of JavaScript examples: http://www.javascripttoolbox.com

Of particular interest is the JavaScript table sorting library that could be used in a few OpenACS based apps: http://www.javascripttoolbox.com/lib/table/index.php

Next Page
previous December 2025
Sun Mon Tue Wed Thu Fri Sat
30 1 2 3 4 5 6
7 8 9 10 11 12 13
(1) 14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3

Popular tags

17 , 5.10 , 5.10.0 , 5.10.1 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , conference , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org