ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`

    IT Discussion
    nextcloud
    7
    15
    3.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xylems
      last edited by scottalanmiller

      All,

      I keep having this issue when uploading files to my newly installed NextCloud instance.

      I have tried all of the fixes I could find online and still have no success.

      Here is the error that I am getting and it is occurring with a lot of files. Obviously, I have modified the log to remove any personal information (mainly just file names).

      7/30/2018 8:22:41 PM, first-part-of-path/e00/d00/e00009c8.au, Nextcloud,Error transferring nextcloud_server/e00/d00/e00009c8.au - server replied: Internal Server Error (An exception occurred while executing 'INSERT INTO oc_file_locks (key,lock,ttl) SELECT ?,?,? FROM oc_file_locks WHERE key = ? HAVING COUNT(*) = 0' with params ["files/3b33f6717fb598e9c795ae575b379005", 1, 1533000159, "files/3b33f6717fb598e9c795ae575b379005"]:

      SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction)

      I can not figure out for the life of me what is wrong. I have attempted to switch to the other methods of Memcache. I attempted to stop my apache server and clear out the oc_file_lock table among other things that I found to try online.

      All still result in having this issue.

      Any help is appreciated! it is driving me nuts!

      -Xylems

      1 Reply Last reply Reply Quote 2
      • dafyreD
        dafyre
        last edited by

        Just to make sure -- are NextCloud and MySQL on the same box?

        1 Reply Last reply Reply Quote 0
        • X
          xylems
          last edited by

          Yes they are

          1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch
            last edited by

            Destroy it and start over. This is very abnormal.

            X 1 Reply Last reply Reply Quote 1
            • X
              xylems @JaredBusch
              last edited by

              @jaredbusch Not really a solution to the problem.

              This was already a fresh installation. I also verified the download as well.

              JaredBuschJ momurdaM 2 Replies Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @xylems
                last edited by

                @xylems said in Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`:

                @jaredbusch Not really a solution to the problem.

                This was already a fresh installation. I also verified the download as well.

                You are getting an error that I have never had and I have installed many of these.

                You could easily have done something wrong unintentionally. Reinstalling is by far the best thing to do for a new install with weird unknown issues.

                1 Reply Last reply Reply Quote 2
                • momurdaM
                  momurda @xylems
                  last edited by

                  @xylems He means you installed it wrong, and that you wont be able to fix it.
                  I agree.
                  If you want the easy way to make this get the Ubuntu 1804 server iso and choose Nextcloud at the end. It will install nextcloud for you.
                  https://www.ubuntu.com/download/server
                  Or follow @JaredBusch guide verbatim.

                  black3dynamiteB scottalanmillerS 2 Replies Last reply Reply Quote 2
                  • travisdh1T
                    travisdh1
                    last edited by

                    Don't be afraid of having to reinstall. Nextcloud makes it easy to keep use settings and data.

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @travisdh1
                      last edited by

                      @travisdh1 said in Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`:

                      Don't be afraid of having to reinstall. Nextcloud makes it easy to keep use settings and data.

                      He has none yet anyway.

                      1 Reply Last reply Reply Quote 1
                      • black3dynamiteB
                        black3dynamite @momurda
                        last edited by

                        @momurda said in Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`:

                        If you want the easy way to make this get the Ubuntu 1804 server iso and choose Nextcloud at the end. It will install nextcloud for you.

                        Is it a snap app version?

                        momurdaM 1 Reply Last reply Reply Quote 0
                        • momurdaM
                          momurda @black3dynamite
                          last edited by

                          @black3dynamite Dunno its the screen at the end similar to other distros where you can choose to install different desktops, ssh, cups, etc. Nextcloud is a choice now in ubuntu

                          black3dynamiteB 1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @momurda
                            last edited by

                            @momurda said in Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`:

                            @xylems He means you installed it wrong, and that you wont be able to fix it.
                            I agree.
                            If you want the easy way to make this get the Ubuntu 1804 server iso and choose Nextcloud at the end. It will install nextcloud for you.
                            https://www.ubuntu.com/download/server
                            Or follow @JaredBusch guide verbatim.

                            It's included now? Very nice.

                            1 Reply Last reply Reply Quote 0
                            • black3dynamiteB
                              black3dynamite @momurda
                              last edited by black3dynamite

                              @momurda said in Nextcloud: An exception occurred while executing 'INSERT INTO `oc_file_locks`:

                              @black3dynamite Dunno its the screen at the end similar to other distros where you can choose to install different desktops, ssh, cups, etc. Nextcloud is a choice now in ubuntu

                              Just confirm it. Nextcloud is installed via snap. The rest apps like PowerShell is from using snap.
                              0_1533060985043_05d489cc-136f-471b-8d50-a86e21050030-image.png

                              momurdaM 1 Reply Last reply Reply Quote 1
                              • momurdaM
                                momurda @black3dynamite
                                last edited by

                                @black3dynamite Yes i just did install nc and powershell from this iso, it is from snaps.
                                It does seem to work as i have this now at server ip
                                0_1533061392834_189ed039-f70a-4e30-afe1-4eea5faec74a-image.png

                                1 Reply Last reply Reply Quote 1
                                • X
                                  xylems
                                  last edited by

                                  I am running this on Fedora and Ubuntu is not really an option as I have other items hosted on this server.

                                  I did install it via the Snap package. Update though, once the initial upload of files finished it seems that it went back and got the files it missed due to the exception. I restarted the service (which I did try prior to posting) and the errors no longer showed up. Only ignored files show and other files that I know previously had an issue uploading did upload.

                                  Strange that the issue just went away though.

                                  1 Reply Last reply Reply Quote 2
                                  • 1 / 1
                                  • First post
                                    Last post