2009年5月18日月曜日

Server Failure

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
DNS and HTTP was not publically available due to bad setting of NAT.

Server may be down for maintenace

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
Sorry for inconviniece. It will down until end of the day.

2009年5月10日日曜日

free or not

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
Absolutly I am going to charge for these if it ready to serve.

  • Weblogging

  • gnubg hosting

  • game record with analysis and databasing



These will stay free.

  • image server

  • game record

  • bear off database



Why? Every thing need money to sustain. That's all.

It is non-sense to do such thing: asking to pay after free services.
「タダが当たり前」の時代は終わる? カフェスタが「お金払って」と呼び掛けた理由 (1/2)

Why not AD based?
O.K, it is simple: Be royal to who pay. If a site is AD based, it will be royal to AD buying companeys, not endusers. I believe that it is very important to royal to endusers, since there is possiblity of "server side cheat" in backgammon. It matters because most likely AD buyers are online backgamon site. Clearly it is NOT good idea to have them as AD buyers.

issue: image broken

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク

Some times images may broken. I invastigate it. Current suspected cause is cache expiration mismatch between mod_mem_cache and etag.

First is by FireFox, second is by Google Chrome, since Google Chrome cache is empty, see no problem with code 200.

This is access log for O.K.

192.168.0.10 - - [10/May/2009:16:35:52 +0900] "GET /image?width=400&format=png&height=300&css=kotobuki&gnubgid=sPPgAwLgc4fBAA%3AcInpACAAEAAA HTTP/1.1" 200 14782
192.168.0.10 - - [10/May/2009:16:53:34 +0900] "GET /image?width=400&format=png&height=300&css=kotobuki&gnubgid=sPPgAwLgc4fBAA%3AcInpACAAEAAA HTTP/1.1" 200 14782

This is access_log for broken

192.168.0.10 - - [10/May/2009:16:35:52 +0900] "GET /image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA HTTP/1.1" 304 -
192.168.0.10 - - [10/May/2009:16:53:34 +0900] "GET /image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA HTTP/1.1" 200 14379

I see the HTTP server returning 304 code.

Here is cacheing log.

[Thu May 07 16:30:14 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
[Fri May 08 02:46:01 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
[Fri May 08 21:06:31 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
[Sun May 10 10:54:40 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
[Sun May 10 16:53:34 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
[Sun May 10 17:31:18 2009] [info] mem_cache: Cached url: http://image.backgammonbase.com:80/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA


so, I checked FireFox disk cache with about:cache?device=disk

Key: http://image.backgammonbase.com/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
Data size: 0 bytes
Fetch count: 1
Last modified: 2009-05-10 16:35:48
Expires: 1970-01-01 09:00:00

Oooops! broken entry is there. Well, why it happend?

Let see other OK cases.

Key: http://image.backgammonbase.com/image?width=400&format=png&height=300&css=kotobuki&gnubgid=jOfgCQIzzpEBMA%3AMAHgAAAACAAA
Data size: 14727 bytes
Fetch count: 1
Last modified: 2009-05-10 16:30:18
Expires: 2009-05-10 17:29:54

Some thing wrong with:

  • Expires goes wrong.

  • Data size is 0 byte



Note:
reload the page, images are generated again and it would be showing OK.

I checked content of cache with about:cache-entry?client=HTTP&sb=1&key=http://image.backgammonbase.com/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA, and found 304 respnse itself is cached... ouch.

key: http://image.backgammonbase.com/image?width=400&format=png&height=300&css=kotobuki&gnubgid=GzuzAQC22wTgAA%3AcInlACAAEAAA
fetch count: 2
last fetched: 2009-05-10 17:19:43
last modified: 2009-05-10 16:35:48
expires: 1970-01-01 09:00:00
Data size: 0
file on disk: C:\Documents and Settings\nori\Local Settings\Application Data\Mozilla\Firefox\Profiles\3url37yt.default\Cache\DC9DBB73d01
Security: This document does not have any security info associated with it.
Client: HTTP
request-method: GET
response-head: HTTP/1.1 304 Not modified
Date: Sun, 10 May 2009 07:35:52 GMT
Server: CherryPy/2.3.0
Cache-Control: public


With google Chrome, it is possible to reproduce problem by pre-requesting page with FireFox, which makes put items in server side cache(?).

In my understanding of this problem is:

  1. There is two or more Apache worker process with mem_cache enabled

  2. process A receives request and cache it on mem.

  3. another process B receives request and got 304 from python cgi, and returns it.
    I need to check what header apache give to python cgi.



Well I hacked mpm.conf in following way: by putting ServerLimit 1, make sure there is only one handling process. I wish to have a feature which binds NameVirtualHost and process, i.e. one prcess on one name, having mem cache for it.

<IfModule worker.c>
StartServers 1
ServerLimit 1
#for mem caceh share
# to stop wrong 304 res for 200 should be
MinSpareThreads 16
MaxSpareThreads 32
MaxRequestsPerChild 0
ThreadLimit 512
ThreadsPerChild 512
MaxClients 512
</IfModule>


References:
apache manual, http://blog.as-is.net/2007/02/modcache.html

2009年5月9日土曜日

all about indexing

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
グーグルに淘汰されない知的生産術より

つまり、気になった記事や論文を切り出して、ファイルに保存して……といった旧来の整理法はもはや無意味で、自己満足にしかなりません。これは紙によるアナログなものだけを言っているのではなく、デジタルのデータを自分のパソコンに保存するとしても同じことです。グーグルが全世界規模でブルドーザーのように情報整理を行っているので、印象に残った記事や論文全体を読みたいのなら、関連するキーワードを三つくらい入力してグーグルで検索すれば、すぐに呼び出せるようになります。

backgammonにおけるこのレベルの情報整理はどのようにしたら達成できるのか?また、それはどのような意味を持つのだろうか?

2009年5月8日金曜日

Idea

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
今はgnubgidを使っているが、google chartsのように手書きできるcodingを使うのも手かもしれない。x=010001,000000,000000,000000,0のような書き方になるだろう。ただieは2083文字までしか使えないらしいので、styleとかの指定方法は注意が必要だろう。

2009年5月7日木曜日

Network is down

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
Due to ISP failure, our server can not be reached.

ネットワーク障害のためサービスが止まっています。

プロバイダの報告
以下、引用。

障害のお詫びと復旧のご報告

平素は朝日ネットをご利用いただき誠にありがとうございます。

 2009年5月7日11時42分頃、当社ASAHIネットが提供するサービスの一部でご利用いただけない状況が発生しておりましたが、同日13時56分頃、一部のサービスにて発生しておりました不安定な状況が解消されましたことをご報告させていただきます。

お客さまには大変ご迷惑をお掛けしましたこと、謹んでお詫び申し上げます。

- 記 -

1.発生日時 2009年5月7日 11時42分頃 ~ 2009年5月7日 13時56分頃
2.影響範囲 当社ASAHIネットサービスの一部
3.内容 以下のサービスが一時的にご利用いただけませんでした。
現在は復旧しておりますので、通常通りご利用いただけます。
 ・インターネット接続サービス
 ・メールサービス全般
 ・当社ホームページ(http://asahi-net.jp/)の閲覧

最新の障害情報については以下にてご確認いただけます。