Jérôme Desquilbet | 2 Jan 18:41 2005

Problem uploading big files

I first experienced this with the wiki, but have the same problem at  
http://yaws.hyber.org/upload0.yaws .
Uploading "big" files fails. I first reported it on  
http://yaws.hyber.org/wiki/showPage.yaws? 
node=SomeProblemsAndTheirSolution and now here on the list
Could anybody try it and tell what happens?
Thanks,
   Jérôme.

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
olivier | 7 Jan 10:37 2005

Strange embedded mode problem


	Hello,

	I'm playing with yaws in embedded mode to test
a little application, and i'm facing a strange problem:

In short, it works on one box and doesn't start on another;
the two machines are basically the same (debian gnu/linux,
kernels 2.4 and 2.6, erlang and yaws built from sources)

The code is taken from http://yaws.hyber.org/embed.yaws

When i start the gui on the second machin i get back an
{ error, need_restart }

What could be the problem ? I tried greping the sources,
it seems like a configuration issue; but i'm begining
in erlang, so not an expert

Thanks,

--
Olivier Girondel <olivier@...>
Project Leader
Dolphian
Claes Wikstrom | 7 Jan 11:12 2005
Picon

Re: Strange embedded mode problem

> 
>         I'm playing with yaws in embedded mode to test
> a little application, and i'm facing a strange problem:
> 
> In short, it works on one box and doesn't start on another;
> the two machines are basically the same (debian gnu/linux,
> kernels 2.4 and 2.6, erlang and yaws built from sources)
> 
> The code is taken from http://yaws.hyber.org/embed.yaws
> 
> When i start the gui on the second machin i get back an
> { error, need_restart }

The code in setconf/2 is completely rewritten with the latest
release. It tries to load the new configuration smothly, i.e.
without stopping any virt servers that doesn't have to be stopped.
In earlier relases, all virt servers were stopped and the restarted
with the new config.

There are a number of config options that require restart though, such
as changing the logdir and a bunch of others too.

If setconf/2 returns need_restart, what is needed in embedded mode
is application:stop(yaws), application:start(yaws) and then redo the setconf/2.

If env {embedded, true} is set, yaws will start with an empty conf

What you describe above though, does indeed seem weird. That the same
setconf/2 works on on box and not on the other. It sure as hell isn't 
related to the kernel version. Something else is missing here.
(Continue reading)

Claes Wikstrom | 7 Jan 11:21 2005
Picon

Re: Problem uploading big files

On Sun, 2 Jan 2005 18:41:25 +0100, Jérôme Desquilbet
<jerome@...> wrote:
> I first experienced this with the wiki, but have the same problem at
> http://yaws.hyber.org/upload0.yaws .
> Uploading "big" files fails. I first reported it on
> http://yaws.hyber.org/wiki/showPage.yaws?
> node=SomeProblemsAndTheirSolution and now here on the list
> Could anybody try it and tell what happens?

This works just fine for me. Describe the problem better, which browser,
size of the file. etc.
Do you get any reported errors

/klacke

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
olivier | 7 Jan 11:53 2005

Re: Strange embedded mode problem


Claes Wikstrom wrote:

| What you describe above though, does indeed seem weird. That the same
| setconf/2 works on on box and not on the other. It sure as hell isn't
| related to the kernel version. Something else is missing here.
|
| I need more data to be able to guide you here ........

Here's what i have:

--------------------------------
. box 1 (no problem)

[11:47:44]$ erl -pa trex -pa /usr/local/lib/yaws/ebin -yaws embedded
true -s gui -sname oliv3
Erlang (BEAM) emulator version 5.4.2.1 [source] [hipe]

Eshell V5.4.2.1  (abort with ^G)
(oliv3 <at> leebo)1>
=INFO REPORT==== 7-Jan-2005::11:47:53 ===
Yaws: Listening to 127.0.0.1:2613 for servers
~ - jokasta under ./www

(oliv3 <at> leebo)1>

--------------------------------
. box 2

olivier <at> cthulhu:~/code/erlang/jokasta$ erl -pa trex -pa
(Continue reading)

Claes Wikstrom | 7 Jan 12:18 2005
Picon

Re: Strange embedded mode problem

> olivier <at> cthulhu:~/code/erlang/jokasta$ erl -pa trex -pa
> /usr/local/lib/yaws/ebin -yaws embedded true -s gui -sname oliv3
> Erlang (BEAM) emulator version 5.4.3 [source] [hipe] [threads:0]
> 
> Eshell V5.4.3  (abort with ^G)
> (oliv3 <at> cthulhu)1> gui:start().
> {error,need_restart}
> (oliv3 <at> cthulhu)2>
>

I still need more information in order to say anything. 
What is the gui module doing for example.

/klacke

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
olivier | 7 Jan 12:31 2005

Re: Strange embedded mode problem


Claes Wikstrom wrote:
|>olivier <at> cthulhu:~/code/erlang/jokasta$ erl -pa trex -pa
|>/usr/local/lib/yaws/ebin -yaws embedded true -s gui -sname oliv3
|>Erlang (BEAM) emulator version 5.4.3 [source] [hipe] [threads:0]
|>
|>Eshell V5.4.3  (abort with ^G)
|>(oliv3 <at> cthulhu)1> gui:start().
|>{error,need_restart}
|>(oliv3 <at> cthulhu)2>
|>
|
|
| I still need more information in order to say anything.
| What is the gui module doing for example.

basically the same thing as ybed.erl:

-module(gui).
-author('olivier@...').
-compile(export_all).

-include("/usr/local/lib/yaws/include/yaws.hrl").

start() ->
~    application:start(yaws),
~    GC = yaws_config:make_default_gconf(false),
~    SC = #sconf {port = 2613,
~                 servername = "jokasta",
~                 listen = {127,0,0,1},
(Continue reading)

Mickael Remond | 7 Jan 12:40 2005

Re: Strange embedded mode problem

olivier wrote:
> basically the same thing as ybed.erl:

Are you sure that you are using the same exact version of Yaws on the 
two boxes ?
Depending on the version you are using, the configuration of Yaws record 
might have changed between the two versions.

--

-- 
Mickaël Rémond

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
olivier | 7 Jan 12:56 2005

Re: Strange embedded mode problem


Mickael Remond wrote:
| Are you sure that you are using the same exact version of Yaws on the
| two boxes ?
| Depending on the version you are using, the configuration of Yaws record
| might have changed between the two versions.

Seems to be it !

The working box has yaws-1.49 and the 'broken' one 1.51. Now i have
to find out which part of the configuration has changed..

Thanks,

--
Olivier Girondel <olivier@...>
Project Leader
Dolphian
Jérôme Desquilbet | 7 Jan 14:21 2005

Re: Problem uploading big files


Le 7 janv. 05, à 11:21, Claes Wikstrom a écrit :

> On Sun, 2 Jan 2005 18:41:25 +0100, Jérôme Desquilbet
> <jerome@...> wrote:
>> I first experienced this with the wiki, but have the same problem at
>> http://yaws.hyber.org/upload0.yaws .
>> Uploading "big" files fails. I first reported it on
>> http://yaws.hyber.org/wiki/showPage.yaws?
>> node=SomeProblemsAndTheirSolution and now here on the list
>> Could anybody try it and tell what happens?
>
> This works just fine for me. Describe the problem better, which 
> browser,
> size of the file. etc.
> Do you get any reported errors
>
>
> /klacke
>

Hello Claes,

Thank you for answering (and thanks a lot for yaws wiki).
Adding a big file (from 2 Mbytes to 20 Mbytes) to a Wiki page displays 
(after a while saying "Sending request to x.y.z.t): "The document 
contains no data" in an alert dialog box ; it is using Firefox on 
Windows (it gives another kind of error with another Web browser on 
another OS). A smaller file (like 200 Kbytes) is OK. I have tried this 
with a Wiki I installed on Linux. No special message in the log 
(Continue reading)


Gmane