Help talk:Toolforge/Archives/2014

Rendered with Parsoid
From Wikitech
Warning! Please do not post any new comments on this page. This is a discussion archive See current discussion or the archives index.

Python files in public_html

How are they handled? mod_python? wsgi? I am unable to create a working hello-world page. --Chricho (talk) 18:03, 1 January 2014 (UTC)Reply

Ah, it is run using cgi, too… --Chricho (talk) 18:22, 1 January 2014 (UTC)Reply

Docs inaccuracies?

The Tools/Help page says that the public_html directory is at ~/public_html. Well, that is not correct, it is in fact at /data/project/mytool/public_html, so you need to "become" the tool for it to be in your home directory. It would be nice if this were clarified at the first location in the doc where public_html is mentioned. Thanks! Oleg Alexandrov (talk) 05:53, 2 January 2014 (UTC)Reply

~ is the abbreviation for an (any) account's home directory (as ~account is an abbreviation for a specific account's home directory). Tool accounts have their home directories at /data/project/$TOOL, so ~/public_html is the subdirectory of the tool's home directory.
The first (:-)) mention of public_html even says:
Note that individual tool accounts have both a ~/public_html/ and a ~/cgi-bin/ directory in the home directory for storing Web files.
If you feel that the documentation could be improved by a clarification, be bold! :-) It's probably easier for you to find a wording that is easier understandable than for someone who is already used to the terminology. --Tim Landscheidt (talk) 16:15, 3 January 2014 (UTC)Reply

Access databases from PHP

How do I access databases from PHP? Also, not sure if it should, but /data/svwiktionary/replica.my.cnf doesn't contain a password to use (I might have deleted it a long time ago if it did).

I'm interested in both the replicas and using my own db. I haven't yet created my own db, but intend to at some point. skalman (talk) 10:33, 25 January 2014 (UTC)Reply

I had apparently reset the password in /data/svwiktionary/replica.my.cnf to something of my choice, so I incorrectly assumed that the "correct password" was lost. However, it seems like it works with the password if I use the password that's in there. skalman (talk) 16:32, 25 January 2014 (UTC)Reply

PHP upgrade

Currently PHP 5.3.10 is installed. Would it be possible to upgrade to 5.5? I don't have any hard dependencies, but I'm lazy and it would be nice to use the shorter array syntax, especially for nested arrays. Furthermore, version 5.3 will be unsupported by July this year. skalman (talk) 22:24, 25 January 2014 (UTC)Reply

A newbie issue: WinSCP and Putty

When using Toolserver, I was used to open two windows - a Putty console and a WinSCP connection. I did the same into Labs with much frustration by obvious mismatch of logged user, since when using WinSCP I am "alebot", while while using Putty i "become itsource". Files were owned by one user, or another one, a simple and obvious evidence for unix skilled users but an enigma for persistent newbies as I am getting frustrating messages when trying to edit anything using the wrong user.

The solution of such an enigma was so obvious that no one of skilled users I asked for help gave me its banal solution.... I had to run a ls -l command to grab the question. --Alex brollo (talk) 09:11, 3 March 2014 (UTC)Reply

Shell access vs Tools access - doc is confusing

In section Getting access to Tool Labs it says I automatically requested shell access and after some time I was added to group "shell". So far OK.

But then it mentions I should request Tools access, but says later (#Notification) that "You will also receive email explaining that your user rights have been changed and that you are now a member of the group 'shell'". But I already have it. Confusing. That's a typo, right? --Eccenux (talk) 20:55, 2 May 2014 (UTC)Reply

Well, from the perspective of the help page, everything is in the future :-). The whole section is very confusing and TL;DR, especially with the technicalities of generating an ssh key thrown in between. IMHO it should be written much simpler and actionable:
  1. Sign up at wikitech for a Labs account.
  2. Fill out an access request for the Tools project.
  3. Wait for the request to be completed.
  4. Generate/upload an ssh key, etc.
However, to me this is all very natural, so I don't want to axe stuff that is essential for others. But: It's a wiki! :-) --Tim Landscheidt (talk) 00:50, 3 May 2014 (UTC)Reply

.htaccess is ignored

Is there a way to mess up the setup of a project? Because what's described on this page about .htaccess just doesn't work. The file is ignored, no matter what I put in it (it should at least bring up a 500). --TMg (talk) 15:58, 10 May 2014 (UTC)Reply

No, you didn't do anything wrong. The information about .htaccess refers to the time when we used Apache and is now obsolete. I'll delete some of it later. Our lighttpd setup uses ~/.lighttpd.conf (caution: You need to webservice restart after changing it). --Tim Landscheidt (talk) 16:25, 10 May 2014 (UTC)Reply

jlocal

The page currently says "Any script or job invoked with jlocal should not be running more than a few seconds and use minimal resources". I have a script that submits multiple jobs, waits for them to complete, then concatenates the results for emailing to me. So it uses minimal resources (most of its wall time is sleeping) but could be running for more than a few seconds if it takes more than a few seconds for the grid to actually schedule and run the submitted jobs. Is this still allowed? Anomie (talk) 14:24, 12 May 2014 (UTC)Reply

Yeah, that's okay.  Coren/Marc (talk) 18:47, 16 July 2014 (UTC)Reply

Bad MySQL performance?

Hi, I have a MySQL table with about 50,000 items, but queries are already slow. All the indexes are there, and the same software is fast on two other machines with an even larger amount of data. "Slow" means that a click on the web page, which causes three or four queries, sometimes takes several seconds. An example page is this one. The queries aren't totally trivial (group by), but they should be fast anyway, like they are on other machines. Are there known performance problems? Any idea what to do? --Dnaber (talk) 17:05, 21 June 2014 (UTC)Reply

Found it out myself: the table was using InnoDB. Using MyISAM, it's as fast as expected. --Dnaber (talk) 20:48, 21 June 2014 (UTC)Reply

Log Rotation?

Hi, what's the proper way to rotate the logs of the jobs started with "jstart"? I tried "logrotate", but when it removes the old files, the system doesn't catch up and new logs are not created (and not used when I run "touch appname.out"). --Dnaber (talk) 18:00, 23 June 2014 (UTC)Reply

Tomcat crashing?

Our Tomcat application had crashed several times, sometimes without any notice in the error logs (~/error.log and public_tomcat/logs/*). By "crash" I mean that it simply didn't run anymore (application not available and no Tomcat job shown with the "qstat" command). What could be the cause for this? Could the "webservice" script be modified to automatically restart Tomcat if needed, like jobs started with "jstart"? --Dnaber (talk) 08:42, 4 July 2014 (UTC)Reply

Some of the crashes are due to "There is insufficient memory for the Java Runtime Environment to continue.", so it seems the the JVM doesn't get enough memory from the system. The JAVA_OPTS I set in public_tomcat/bin/setenv.sh say that the JVM gets 300M. --Dnaber (talk) 16:12, 7 July 2014 (UTC)Reply
It seems it was a memory problem - I have just added a solution that works for me to https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Java_webservice_.28Tomcat.29 --Dnaber (talk) 12:45, 29 July 2014 (UTC)Reply

Hay's tool for metadata?

Is someone able to add some information about Hay's tool to add metadata? Seems that as it is now operational, that the addition of some text for this would be beneficial. Thanks. Billinghurst (talk) 11:14, 30 August 2014 (UTC)Reply

Jobs submitted to the grid via 'cron'

Hi,

I don't want to receive an email for each job working with 'cron', so what I should do? Thank you, Automatik (talk) 19:21, 25 December 2014 (UTC)Reply

If you use jsub, you can use the -quiet option to suppress output unless the job submission failed. --Tim Landscheidt (talk) 15:52, 28 December 2014 (UTC)Reply
Thanks for your help! --Automatik (talk) 20:04, 30 December 2014 (UTC)Reply