Announcement

Collapse
No announcement yet.

Unable to attach attachments > 1M

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to attach attachments > 1M

    I have changed the Maximum File Size field in CP to 10240000 to basically allow for up to 10 meg files.




    I try to attach a 1.7 meg file and click Submit New Thred/Post Reply and it sits there waiting about 10-30 seconds and then pops up an error



    Towards the bottom of the email it sends me is:

    mysql error: MySQL server has gone away

    mysql error number: 2006


    I have searched forums here for this and found the following which I have applied and am still getting the same error as above.

    http://www.vbulletin.com/forum/showt...tachments+2006

    http://www.vbulletin.com/forum/showt...threadid=34108




    My current setup
    W2k - IIS (latest patches - updates)
    URL: intranet





    mysqladmin -u root -p version result:
    mysqladmin Ver 8.23 Distrib 3.23.52, for Win95/Win98 on i32
    Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license

    Server version 3.23.52-nt
    Protocol version 10
    Connection localhost via TCP/IP
    TCP port 3306
    Uptime: 19 min 4 sec

    Threads: 1 Questions: 341 Slow queries: 0 Opens: 28 Flush tables: 1
    Open tables: 22 Queries per second avg: 0.298


    phpinfo results.



    I dont have a my.cnf but found my.ini in my windows dir.
    Contents of c:\winnt\my.ini

    #This File was made using the WinMySQLAdmin 1.4 Tool
    #9/19/2002 11:51:18 AM

    #Uncomment or Add only the keys that you know how works.
    #Read the MySQL Manual for instructions

    [mysqld]
    basedir=C:/mysql
    #bind-address=192.31.230.19
    datadir=C:/mysql/data
    #language=C:/mysql/share/your language directory
    #slow query log#=
    #tmpdir#=
    #port=3306
    #set-variable=key_buffer=16M
    [WinMySQLadmin]
    Server=C:/mysql/bin/mysqld-nt.exe
    user=*****
    password=*****
    set-variable = max_allowed_packet=15M



    Anyone have any ideas why this would be still happening after all these suggested changes? Let me know if you need more information.. Thanks

  • #2
    change your my.ini file to below one and restart mysql and see if that helps but generally i'd recommend you don't try uploading such large files as attachments as vB wasn't meant to be used for file storage in - such large attachment tables in a database can cause problems in future


    [mysqld]
    basedir=C:/mysql
    datadir=C:/mysql/data
    set-variable = max_connections=450
    set-variable = key_buffer=16M
    set-variable = myisam_sort_buffer_size=64M
    set-variable = join_buffer=1M
    set-variable = record_buffer=1M
    set-variable = sort_buffer=2M
    set-variable = table_cache=1024
    set-variable = thread_cache_size=256
    set-variable = wait_timeout=9600
    set-variable = connect_timeout=10
    set-variable = max_allowed_packet=16M
    set-variable = max_connect_errors=10

    [safe_mysqld]
    open_files_limit=8192

    [mysqldump]
    quick
    set-variable = max_allowed_packet=16M

    [myisamchk]
    set-variable = key_buffer=64M
    set-variable = sort_buffer=64M
    set-variable = read_buffer=16M
    set-variable = write_buffer=16M

    [WinMySQLadmin]
    Server=C:/mysql/bin/mysqld-nt.exe
    user=*****
    password=*****
    set-variable = max_allowed_packet=15M
    remember to change the user and password under winmysqladmin
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3
      Thanks Eva, that did the trick.

      I know it isn't recommended to put large files as attachments, but with v3 just around the corner and having attachments stored as files, I didn't want to go with a hack and have it alter the attachment table and make it all that much harder to convert.

      What is the max file size would you recommend? I just set it at 15megs to be safe since all we are attaching is word/excel files.

      Thanks
      Brent

      Comment


      • #4
        Originally posted by BetaMax
        Thanks Eva, that did the trick.

        I know it isn't recommended to put large files as attachments, but with v3 just around the corner and having attachments stored as files, I didn't want to go with a hack and have it alter the attachment table and make it all that much harder to convert.

        What is the max file size would you recommend? I just set it at 15megs to be safe since all we are attaching is word/excel files.

        Thanks
        Brent
        glad to see it worked for you

        excel and word doc files can be winzipped compressed so my suggestion is to limit max file size to 500 - 800kb and ask your members to first winzip compress the file before uploading.....and even that is too large in my opinion...
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment


        • #5
          Aye, will be instituting a policy on that. Thanks again for your help.

          Comment


          • #6
            Originally posted by BetaMax
            Aye, will be instituting a policy on that. Thanks again for your help.
            no probs
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X